Skip to main content

Module packets

Module packets 

Source
Expand description

Stateless Protocol 1 packet parsing and building functions.

This module provides pure, synchronous functions for working with Protocol 1 USB-frame-level packets. It has no dependency on tokio, async, or the “client” feature, so it can be used from both native and WASM targets.

Structs§

P1RxFrame
Parsed IQ data from one Protocol 1 USB frame (1032 bytes).
P1Status
Status fields extracted from Protocol 1 response control bytes.

Functions§

build_control_bytes
Build the 5 control bytes [C0, C1, C2, C3, C4] for a given address in the P1 control rotation.
build_tx_packet
Build a 1032-byte Protocol 1 host-to-radio (TX) packet.
parse_response_control_bytes
Parse the 5 response control bytes (C0-C4) from a radio-to-host sub-frame and update the accumulated status.
parse_rx_packet
Parse a 1032-byte Protocol 1 RX packet into IQ samples per DDC.