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

◆ make_framer()

auto MayaFlux::Core::SerialReader::make_framer ( const SerialSpec & spec)
staticprivate

Definition at line 38 of file SerialReader.cpp.

39{
40 const size_t limit = spec.message_limit;
41
42 switch (spec.framing) {
44 return Framer { std::in_place_type<P::LineFramer>, limit };
46 const auto terminator = spec.delimiter();
47 return Framer { std::in_place_type<P::DelimiterFramer>, std::span<const uint8_t> { terminator }, limit };
48 }
50 return Framer { std::in_place_type<P::CobsFramer>, limit };
52 return Framer { std::in_place_type<P::SlipFramer>, limit };
54 return Framer { std::in_place_type<P::IdleGapFramer>, std::chrono::duration_cast<std::chrono::microseconds>(spec.gap), limit };
56 break;
57 }
58 return Framer { std::in_place_type<P::RawChunkFramer> };
59}
std::variant< Transitive::Protocol::RawChunkFramer, Transitive::Protocol::LineFramer, Transitive::Protocol::DelimiterFramer, Transitive::Protocol::CobsFramer, Transitive::Protocol::SlipFramer, Transitive::Protocol::IdleGapFramer > Framer
const SerialSpec & spec() const

References MayaFlux::Core::COBS, MayaFlux::Core::DELIMITED, MayaFlux::Core::IDLE_GAP, MayaFlux::Core::LINES, MayaFlux::Core::RAW, MayaFlux::Core::SLIP, and spec().

Referenced by SerialReader().

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