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

◆ handle_frame()

void MayaFlux::Core::SerialReader::handle_frame ( Transitive::Protocol::Message frame)
private

Definition at line 102 of file SerialReader.cpp.

103{
104 m_frames.fetch_add(1);
105
106 if (m_filter && m_filter(frame)) {
107 return;
108 }
109
110 switch (m_spec.parse) {
112 deliver(InputValue::make_bytes(std::vector<uint8_t>(frame.begin(), frame.end()), m_id, InputType::SERIAL));
113 break;
115 deliver(parse_numbers_of(frame, m_id));
116 break;
118 deliver(m_spec.parser ? m_spec.parser(frame) : std::nullopt);
119 break;
121 break;
122 }
123}
std::atomic< uint64_t > m_frames
void deliver(std::optional< InputValue > value)
@ SERIAL
Serial port communication (Arduino, etc.).
static InputValue make_bytes(std::vector< uint8_t > v, uint32_t dev_id, InputType src)

References MayaFlux::Core::BYTES, MayaFlux::Core::CUSTOM, deliver(), m_filter, m_frames, m_id, m_spec, MayaFlux::Core::InputValue::make_bytes(), MayaFlux::Core::MIDI, MayaFlux::Core::NUMBERS, and MayaFlux::Core::SERIAL.

Referenced by handle_gap(), and push().

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