Expand description
ULCP frame grammar.
A frame is a one-byte header, a one-byte command identifier, and a
command-defined payload. Frame length is provided by the framing
layer (see crate::hdlc for asynchronous serial links).
Structs§
- Frame
- A parsed frame borrowing its payload from the input.
- Frame
Writer - Incremental frame builder over a caller-provided buffer.
- Header
- Validated frame header byte.
- Prop
Payload - Payload of
CMD_PROP_GET,CMD_PROP_SET, andCMD_PROP_IS. - Stream
Payload - Payload of
CMD_STR_SENDandCMD_STR_RECV.
Enums§
- Cmd
- Command identifiers defined by the minimal and full specs.
- Parse
Error - Write
Error
Constants§
- HEADER_
FLG_ MASK - Mask of the two most significant header bits (the
FLGfield). - HEADER_
FLG_ PATTERN - Required value of the
FLGfield (0b10in the top two bits). - HEADER_
RESERVED_ MASK - Mask of the three reserved header bits, which must be zero.
- HEADER_
TID_ MASK - Mask of the three-bit transaction identifier.
- TID_MAX
- Largest usable transaction identifier.
- TID_
UNSOLICITED - TID reserved for unsolicited commands and stream traffic.
Functions§
- clear
- Encode a
CMD_CLEARframe (no payload). - factory_
reset - Encode a
CMD_FACTORY_RESETframe (no payload). The device erases all mutable state and reboots without replying. - last_
status - Encode a
CMD_PROP_ISframe carryingPROP_LAST_STATUS. - nop
- Encode a
CMD_NOPframe. - prop_
get - Encode a
CMD_PROP_GETframe. - prop_
insert - Encode a
CMD_PROP_INSERTframe.itemis one item in the property’s item form, with no length prefix. - prop_
inserted - Encode a
CMD_PROP_INSERTEDframe.digestis the inserted item in the property’s digest form — never in a form containing key material. - prop_is
- Encode a
CMD_PROP_ISframe. - prop_
remove - Encode a
CMD_PROP_REMOVEframe.selectoris the property’s documented item selector, with no length prefix. - prop_
removed - Encode a
CMD_PROP_REMOVEDframe.digestis the removed item in the property’s digest form. - prop_
set - Encode a
CMD_PROP_SETframe. - queue_
drain - Encode a
CMD_QUEUE_DRAINframe (no payload). - reset
- Encode a
CMD_RSTframe. - restore
- Encode a
CMD_RESTOREframe (no payload). - save
- Encode a
CMD_SAVEframe (no payload). - str_
recv - Encode a
CMD_STR_RECVframe. Always uses TID zero. - str_
send - Encode a
CMD_STR_SENDframe.