Skip to main content

Module framing

Module framing 

Source
Expand description

COBS framing for the DongLoRa wire protocol.

Every frame sent between host and firmware is a COBS-encoded Command or Response payload followed by a single 0x00 sentinel byte. CobsDecoder accumulates an inbound byte stream and yields parsed Commands; cobs_encode_response produces a wire-ready byte slice from a Response.

Kept tiny and alloc-free so both the firmware (no_std, bounded buffers) and host crates can share it.

Structs§

CobsDecoder
Decodes COBS-framed commands from a byte stream.

Constants§

MAX_FRAME
Maximum COBS frame size (bytes).

Functions§

cobs_encode_response
COBS-encode a response into encode_buf with trailing 0x00 sentinel.