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

◆ push()

void MayaFlux::Core::SerialReader::push ( std::span< const uint8_t > chunk)

Definition at line 76 of file SerialReader.cpp.

77{
78 if (m_spec.parse == SerialParse::MIDI) {
79 parse_midi(chunk);
80 return;
81 }
82
83 const auto on_frame = [this](P::Message frame) { handle_frame(frame); };
84 std::visit(
85 [&](auto& framer) {
86 const auto report = framer.push(chunk, on_frame);
87 m_dropped.fetch_add(report.discarded);
88 if constexpr (std::is_same_v<std::decay_t<decltype(framer)>, P::IdleGapFramer>) {
89 arm_gap();
90 }
91 },
92 m_framer);
93}
void handle_frame(Transitive::Protocol::Message frame)
std::atomic< uint64_t > m_dropped
void parse_midi(std::span< const uint8_t > chunk)

References arm_gap(), handle_frame(), m_dropped, m_framer, m_spec, MayaFlux::Core::MIDI, and parse_midi().

Referenced by operator=().

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