MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_layout()

std::optional< TabletLayout > MayaFlux::Core::TabletBackend::get_layout ( uint32_t  device_id) const

Parsed report layout for the device backing a tool.

Exposed for inspection and for writing custom unpackers against hardware whose descriptor is unusual.

Definition at line 927 of file TabletBackend.cpp.

928{
929 std::lock_guard lock(m_devices_mutex);
930
931 auto path_it = m_tool_paths.find(device_id);
932 if (path_it == m_tool_paths.end())
933 return std::nullopt;
934
935 auto dev_it = m_devices.find(path_it->second);
936 if (dev_it == m_devices.end())
937 return std::nullopt;
938
939 return dev_it->second->layout;
940}
std::unordered_map< uint32_t, std::string > m_tool_paths
std::unordered_map< std::string, std::shared_ptr< TabletDevice > > m_devices

References m_devices, m_devices_mutex, and m_tool_paths.