umsh_ulcp/
lib.rs

1#![cfg_attr(not(test), no_std)]
2
3//! Wire format for the UMSH Local Control Protocol (ULCP).
4//!
5//! This crate implements the byte-level grammar specified in
6//! `docs/protocol/src/ulcp-core.md`: packed unsigned
7//! integers, the frame header and command layer, property/stream/status
8//! identifiers, the `STR_PHY_RAW` metadata envelopes
9//! (`ulcp-transport.md`), and HDLC-Lite framing for asynchronous serial
10//! transports (UART, USB-CDC).
11//!
12//! It is shared between the host side (a `umsh-hal::Radio`
13//! implementation that drives a companion radio over a serial link) and
14//! the device firmware side (the session that exposes the local radio).
15//! Every wire-format detail lives here and only here.
16//!
17//! The crate is `no_std`, allocation-free, and has no dependencies.
18//! Callers provide byte buffers; encoders return the number of bytes
19//! written and decoders borrow from the input.
20
21pub mod airtime;
22pub mod alert;
23pub mod battery;
24pub mod ble;
25pub mod describe;
26pub mod frame;
27pub mod gatt;
28pub mod gnss;
29pub mod hdlc;
30pub mod host;
31pub mod ids;
32pub mod items;
33pub mod meta;
34pub mod profiles;
35pub mod pui;
36pub mod reply;
37pub mod sint;
38pub mod stats;
39pub mod status;
40
41pub use alert::AlertState;
42pub use battery::{BatteryChargeState, BatteryError, BatteryStatus};
43pub use describe::{
44    FrameDescription, PROPERTIES, PropertyType, capability_name, property_name, property_type,
45};
46pub use frame::{
47    Cmd, Frame, FrameWriter, Header, MultiEntries, MultiEntry, MultiGetKeys, PropPayload,
48    StreamPayload,
49};
50pub use gnss::{FixKind, GnssError, GnssSnapshot};
51pub use meta::{BufferedRxMeta, RxMeta, TxMeta};
52pub use status::Status;