Expand description
Device-side session engine for the minimal ULCP profile and independently advertised full-profile extensions.
Session is a pure state machine: it consumes decoded
ULCP frames (framing such as HDLC-Lite is handled by the
caller), emits response frames through a caller-provided sink, and
returns radio side effects (Effect) for the caller to execute.
It performs no I/O and takes time as a parameter, so the whole
protocol surface is testable on the host; firmware only supplies
the byte pipes and the radio.
Design constraints from the spec
(docs/protocol/src/ulcp-core.md,
docs/protocol/src/ulcp-transport.md):
- one confirmed transmit in flight at a time (
STATUS_BUSY); - transmits never wait for duty-cycle allowance
(
STATUS_DUTY_LIMITunless theNODUTYflag is set); CMD_RSTis a protocol-level reset: all session state returns to post-reset defaults and the radio is re-applied, but the MCU (and therefore the USB link) stays up.
v0 limitations (all surfaced through defined status codes):
PROP_PHY_RSSI is unimplemented, the sync word only accepts the
value the firmware was built with, and the CCA transmit flag is
ignored (frames transmit without a clear-channel check, matching
the existing firmware radio path).
Re-exports§
pub use duty::DutyExceeded;pub use duty::DutyLedger;pub use duty::DutyTracker;pub use session::AlertConfig;pub use session::BatteryFields;pub use session::DEFAULT_IDENT_PRECISION;pub use session::Effect;pub use session::GnssConfig;pub use session::IdentitySource;pub use session::MAX_CHANNEL_KEYS;pub use session::MAX_DEV_PEERS;pub use session::MAX_DEVICE_NAME_LEN;pub use session::MAX_IDENT_PRECISION;pub use session::MAX_REPEATER_REGIONS;pub use session::PRIVATE_KEY_LEN;pub use session::RadioSettings;pub use session::SNAPSHOT_MAX;pub use session::SavedStatus;pub use session::Session;pub use session::SessionConfig;pub use session::SnapshotError;pub use session::TimeConfig;pub use session::TxOutcome;pub use session::TxPower;