Skip to main content

Crate uart_fpl

Crate uart_fpl 

Source
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.
FrameParser
Streaming parser for continuous byte streams from serial interfaces.
HandshakeResponse
Structured handshake response containing negotiation status and selected protocol.
HostHandshake
Host-side handshake coordinator.
ResendReceiver
Go-Back-N receiver state machine.
ResendSender
Go-Back-N sliding-window sender state machine.
RetransmissionLimitExceeded
Error emitted when consecutive Go-Back-N retransmission timeouts exceed the configured limit.
TargetHandshake
Target-side handshake coordinator.
UnexpectedSeqError
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.
FrameError
Errors that can occur during packet encoding or frame validation.
FrameStatus
Status of an incoming frame evaluated against the receiver window.
FrameType
Protocol frame type indicator.
HandshakeError
Errors that can occur during Channel 0 protocol negotiation.
HandshakeStatus
Negotiation status reported by the target in a handshake response.
ProtocolId
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.