MayaFlux 1.0.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 952 of file TabletBackend.cpp.

953{
954 std::lock_guard lock(m_devices_mutex);
955
956 auto path_it = m_tool_paths.find(device_id);
957 if (path_it == m_tool_paths.end())
958 return std::nullopt;
959
960 auto dev_it = m_devices.find(path_it->second);
961 if (dev_it == m_devices.end())
962 return std::nullopt;
963
964 return dev_it->second->layout;
965}
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.