Expand description
UART Framing Protocol Library (uart_fpl).
Provides binary packet framing, streaming parsing with preamble synchronization, CRC-8 header protection, Channel 0 dynamic protocol negotiation, and sliding-window flow control primitives for reliable transport over serial links.
Structs§
- AckTracker
- Thread-safe cumulative ACK tracker with waker notifications.
- Frame
- Wire representation of a parsed UART protocol frame emitted by
crate::FrameParser. - Frame
Parser - Streaming parser for continuous byte streams from serial interfaces.
- Handshake
Response - Structured handshake response containing negotiation status and selected protocol.
- Host
Handshake - Host-side handshake coordinator.
- Resend
Receiver - Go-Back-N receiver state machine.
- Resend
Sender - Go-Back-N sliding-window sender state machine.
- Retransmission
Limit Exceeded - Error emitted when consecutive Go-Back-N retransmission timeouts exceed the configured limit.
- Target
Handshake - Target-side handshake coordinator.
- Unexpected
SeqError - Error emitted when an incoming sequence number does not match the expected sequence number.
Enums§
- AckOutcome
- Outcome of processing an acknowledgment sequence number in the sender.
- Frame
Error - Errors that can occur during packet encoding or frame validation.
- Frame
Status - Status of an incoming frame evaluated against the receiver window.
- Frame
Type - Protocol frame type indicator.
- Handshake
Error - Errors that can occur during Channel 0 protocol negotiation.
- Handshake
Status - Negotiation status reported by the target in a handshake response.
- Protocol
Id - Protocol version identifier negotiated during handshake.
Constants§
- CONTROL_
CHANNEL_ ID - Reserved logical channel identifier for handshake negotiation and link control.
- DEFAULT_
MAX_ RETRANSMISSION_ ATTEMPTS - Maximum consecutive retransmission timeouts before the transport session fails.
- DEFAULT_
RETRANSMISSION_ TIMEOUT - Default retransmission timeout duration for Go-Back-N recovery (1,000 ms).
- DEFAULT_
WINDOW_ SIZE - Default sliding window size for ResendSP (number of frames in flight).
- MAX_
FRAME_ SIZE - Maximum total wire size in bytes of an encoded frame (header + payload + CRC-32).
- MAX_
PAYLOAD_ SIZE - Maximum payload size in bytes accepted by framing encoders and parsers.
Functions§
- encode_
frame - Serializes and encodes a protocol frame with the 13-byte binary header,
1-byte header checksum (
HdrChk), and trailing CRC-32 checksum.