MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Framing.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MayaFlux::Transitive::Protocol::detail::ClearOnExit
class  MayaFlux::Transitive::Protocol::CobsFramer
 Messages in Consistent Overhead Byte Stuffing, each ended by a zero byte. More...
class  MayaFlux::Transitive::Protocol::DelimiterFramer
 Splits a byte stream at a terminator of one or more bytes, whatever the chunking. More...
struct  MayaFlux::Transitive::Protocol::FrameReport
 What one push did. More...
class  MayaFlux::Transitive::Protocol::IdleGapFramer
 Messages ended by a quiet period on the line, as in Modbus RTU. More...
class  MayaFlux::Transitive::Protocol::LengthPrefixFramer
 Messages with a four byte big-endian length before each payload. More...
class  MayaFlux::Transitive::Protocol::LineFramer
 Splits a byte stream into lines, whatever the chunking. More...
struct  MayaFlux::Transitive::Protocol::RawChunkFramer
 The framer for raw streams: every push is one message, with nothing to reassemble. More...
class  MayaFlux::Transitive::Protocol::SlipFramer
 Messages in SLIP (RFC 1055), each ended by 0xC0. More...

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
namespace  MayaFlux::Transitive
namespace  MayaFlux::Transitive::Protocol
namespace  MayaFlux::Transitive::Protocol::detail

Concepts

concept  MayaFlux::Transitive::Protocol::MessageSink
 A callable that receives each complete message.

Typedefs

using MayaFlux::Transitive::Protocol::Message = std::span<const uint8_t>
 One complete message.

Enumerations

enum class  MayaFlux::Transitive::Protocol::FrameFault : uint8_t { MayaFlux::Transitive::Protocol::None , MayaFlux::Transitive::Protocol::Oversized , MayaFlux::Transitive::Protocol::Invalid }
 Why input was refused. More...

Functions

void MayaFlux::Transitive::Protocol::detail::append_be_u32 (std::vector< uint8_t > &out, uint32_t value)
std::string_view MayaFlux::Transitive::Protocol::as_text (Message message) noexcept
 View a message as text without copying.
bool MayaFlux::Transitive::Protocol::detail::cobs_decode (Message frame, std::vector< uint8_t > &out)
 Decode one COBS frame, without its zero delimiter.
void MayaFlux::Transitive::Protocol::encode_cobs (Message payload, std::vector< uint8_t > &out)
 Append a payload in COBS, followed by its zero delimiter, to out.
bool MayaFlux::Transitive::Protocol::encode_delimited (Message payload, Message terminator, std::vector< uint8_t > &out)
 Append a payload and a terminator to out, in the form DelimiterFramer reads back.
bool MayaFlux::Transitive::Protocol::encode_length_prefixed (Message payload, std::vector< uint8_t > &out, size_t max_payload=default_max_frame, bool reject_empty=false)
 Append a length prefix and a payload to out, in the form LengthPrefixFramer reads back.
bool MayaFlux::Transitive::Protocol::encode_line (Message payload, std::vector< uint8_t > &out)
 Append a payload and its LF to out, in the form LineFramer reads back.
void MayaFlux::Transitive::Protocol::encode_slip (Message payload, std::vector< uint8_t > &out)
 Append a payload in SLIP, followed by 0xC0, to out.
uint32_t MayaFlux::Transitive::Protocol::detail::load_be_u32 (const uint8_t *src) noexcept

Variables

constexpr size_t MayaFlux::Transitive::Protocol::default_max_frame = size_t { 64 } << 20
constexpr size_t MayaFlux::Transitive::Protocol::default_max_line = size_t { 1 } << 20