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

◆ set_device_spec()

bool MayaFlux::Core::SerialInputBackend::set_device_spec ( uint32_t device_id,
SerialSpec spec )

Give a device its spec, before it is opened.

Returns
false for an unknown device or one that is open.

Definition at line 438 of file SerialInputBackend.cpp.

439{
440 return m_roster.update([&](Roster& roster) {
441 const auto it = roster.entries.find(device_id);
442 if (it == roster.entries.end() || it->second.device) {
443 return false;
444 }
445 Entry changed = it->second;
446 changed.spec = spec;
447 roster.entries.insert_or_assign(device_id, std::move(changed));
448 return true;
449 });
450}
Memory::SnapshotCell< Roster > m_roster

References MayaFlux::Core::SerialInputBackend::Roster::entries, m_roster, set_device_spec(), and MayaFlux::Core::SerialInputBackend::Entry::spec.

Referenced by set_device_spec().

Here is the call graph for this function:
Here is the caller graph for this function: