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 lan_bearer::LanBearerRole;pub use net::IpConfig;pub use net::MAX_RESOLVERS;pub use net::ResolverError;pub use net::Resolvers;pub use net::SelectedNetwork;pub use net::WifiConfig;pub use session::AlertConfig;pub use session::AnnounceRequest;pub use session::BatteryFields;pub use session::Binding;pub use session::CHANNEL_TAG_LEN;pub use session::DEFAULT_IDENT_PRECISION;pub use session::Effect;pub use session::GnssConfig;pub use session::HELD_LISTS_MAX;pub use session::I2C_DATA_MAX;pub use session::I2C_MAX_OPS;pub use session::IdentitySource;pub use session::MAX_CHANNEL_KEYS;pub use session::MAX_DEV_ADMINS;pub use session::MAX_DEV_PEERS;pub use session::MAX_DEVICE_NAME_LEN;pub use session::MAX_IDENT_PRECISION;pub use session::MAX_MESHCORE_REGIONS;pub use session::MAX_PEER_KEYS;pub use session::MAX_REPEATER_REGIONS;pub use session::MAX_TEMPERATURE_SENSORS;pub use session::MULTI_MAX;pub use session::NETWORK_TABLE_MAX;pub use session::PRIVATE_KEY_LEN;pub use session::QueuedClass;pub use session::QueuedNotice;pub use session::RadioRxInfo;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::TEMPERATURE_NAMES_MAX;pub use session::TimeConfig;pub use session::TxOutcome;pub use session::TxPower;pub use session::assert_i2c_tables_fit;pub use session::is_saved;
Modules§
- bridge
- Saved device-domain configuration for one autonomous bridge connection.
- duty
- Transmit duty-cycle accounting for
PROP_PHY_DUTY_NOW. - known_
networks - Bounded, secret-bearing station configuration. Never format credentials.
- lan_
bearer - Saved device-domain configuration for the LAN bearer.
- listeners
- What one listener’s request means for the others.
- net
- What the session holds about the device’s Wi-Fi station and its IP stack, and what it leaves to the platform.
- session
- The ULCP session state machine.
Constants§
- MESHCORE_
REGION_ NAME_ MAX_ LEN - Longest a MeshCore region name may be, in UTF-8 bytes, without its
implicit
#(PROP_MESHCORE_REGIONS): what the MeshCore v1.17.1 region table stores. - REGION_
STRING_ MAX_ LEN - Longest a region’s string form may be, in UTF-8 bytes
(
PROP_MAC_REPEATER_REGIONS, and the Supported Flood Regions node-identity option). The device derives the code from the string.