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 describe;
25pub mod frame;
26pub mod gatt;
27pub mod gnss;
28pub mod hdlc;
29pub mod host;
30pub mod ids;
31pub mod items;
32pub mod meta;
33pub mod pui;
34pub mod status;
35
36pub use alert::AlertState;
37pub use battery::{BatteryChargeState, BatteryError, BatteryStatus};
38pub use describe::{FrameDescription, capability_name, property_name};
39pub use frame::{Cmd, Frame, FrameWriter, Header, PropPayload, StreamPayload};
40pub use gnss::{FixKind, GnssError, GnssSnapshot};
41pub use meta::{BufferedRxMeta, RxMeta, TxMeta};
42pub use status::Status;