Module ulcp

Module ulcp 

Source
Expand description

Host-side client for the UMSH Local Control Protocol (ULCP).

UlcpDevice drives a device over a frame-oriented FrameLink, and exposes the link as a [umsh_hal::Radio] so the host can run the full MAC/node stack with the device acting purely as the PHY.

The wire format lives in [umsh_ulcp] (re-exported as [crate::ulcp_wire]); this module owns the host-side session behavior: the reset/configure handshake, request/response transactions, and queueing of frames that arrive while a command is in flight.

See docs/protocol/src/ulcp.md and the chapters under it for the protocol.

Structs§

AdvertPolicy
What a device announces without being asked.
BleFrameLink
GATT/SAR frame transport backed by btleplug.
BleFrameLinkConfig
BLE-specific link configuration.
BleScanResult
One ULCP GATT Service peripheral seen during a BleFrameLink::scan.
DeviceSync
Device state gathered by UlcpDevice::sync: the spec’s post-attach synchronization procedure. Fields whose capability the device does not advertise are None; multi-value properties are the digest forms and never contain key material.
DeviceTime
The wall clock of a CAP_TIME device.
GnssStatus
Everything a CAP_GNSS device reports about positioning: the switch, the current fix, and the policy that governs what is done with it.
HostProvisioning
The host-domain state UlcpDevice::provision establishes on the device.
ProvisionReport
What UlcpDevice::provision wrote.
RawRxFrame
One inbound STR_PHY_RAW frame with its trailing metadata exactly as the device sent it.
RepeaterPolicy
The repeater forwarding policy of a CAP_REPEATER device.
SerialFrameLink
HDLC-Lite framing over a reliable asynchronous byte stream.
UlcpDevice
Companion radio attached over a frame link, usable as a [umsh_hal::Radio].
UlcpDeviceConfig
RF and session configuration applied during initialization.

Enums§

AttachMode
The two relationships a host can have with a device.
HostOwnership
Verdict of comparing PROP_HOST_KEY against this host’s identity (spec §Attach, Detach, and Synchronization, step 2).
PropEvent
An unsolicited property notification (TID zero) retained for the caller: device state can change for reasons the host did not initiate, and publication of the new authoritative value is how the protocol reports that. Multi-value payloads are in digest form and never contain key material.
RestoreCompletion
How the device reported a successful CMD_RESTORE. Both forms leave the device in the same configuration; they differ only in reporting and session-state handling.
SavedSnapshot
PROP_SAVED: what the device reports about its stored snapshot.
TraceDirection
Direction of a traced ULCP frame.
UlcpError

Traits§

FrameLink
A cancel-safe, frame-oriented ULCP transport.

Functions§

describe_frame
Render one ULCP frame as a one-line human-readable summary: command, TID, property mnemonic, and the decoded status where the payload is a PROP_LAST_STATUS value. Values are summarized by length — never dumped — so traces cannot leak key material.

Type Aliases§

FrameTrace
Sink for per-frame trace lines (see UlcpDevice::set_frame_trace).