Expand description
ECR17 packet framing: encode/decode STX payload ETX LRC application frames,
SOH message EOT progress updates (no LRC), and ACK/NAK control frames.
PacketCodec::decode treats the input buffer as exactly one frame. Frame shapes
differ: an application frame ends with its LRC byte, a progress frame ends with EOT
(no LRC), and a control frame is recognized by its lead byte. Splitting a coalesced
byte stream into individual frames is the transport/session layer’s responsibility,
not the codec’s.
Port of the reference C++ PacketCodec.
Structs§
- Decoded
Packet - A decoded frame. For
PacketType::Application,valid_lrcreports whether the received LRC matched the recomputed one. - Packet
Codec - Frames and parses ECR17 packets for a given
LrcMode.
Enums§
- Packet
Type - The kind of frame
PacketCodec::decoderecognized.