Expand description
Typed Serial API messages: request builders and parsers for responses, callbacks and unsolicited frames.
Every parser takes the frame payload and returns Err(Malformed) rather
than panicking on short or inconsistent input; lengths inside a payload
are clamped to what the payload actually holds.
Modules§
- add_
mode - Inclusion modes for
ADD_NODE_TO_NETWORK. - nvm
- NVM backup subcommands (
NVM_OPERATIONS,EXTENDED_NVM_OPERATIONS). - setup
- Serial API setup subcommands.
- tx_
options - Transmit options for SendData.
Structs§
- Application
Command - A command class frame received from a node (
APPLICATION_COMMAND_HANDLERor its bridge variant). - Controller
Id - Response to
GET_CONTROLLER_ID. - Controller
Version - Response to
GET_CONTROLLER_VERSION. - Init
Data - Response to
GET_INIT_DATA. - Malformed
- A payload that does not have the shape its function id promises.
- Node
Info - A node information frame: device classes and command classes.
- Node
Protocol Info - Response to
GET_NODE_PROTOCOL_INFO. - NvmResponse
- A response to an NVM operation.
- RxStatus
- Reception flags of a received frame.
- Send
Data Result - A SendData callback.
- Serial
ApiCapabilities - Response to
GET_SERIAL_API_CAPABILITIES. - TxReport
- The transmit report the controller appends to a SendData callback once TX status reporting is enabled: the route the frame took and its signal.
Enums§
- AddNode
Status - Progress of an inclusion (
ADD_NODE_TO_NETWORKcallbacks). - Application
Update APPLICATION_UPDATEframes.- Remove
Node Status - Progress of an exclusion (
REMOVE_NODE_FROM_NETWORKcallbacks). - RfRegion
- An RF region.
- Transmit
Status - How a SendData ended.
Constants§
- LONG_
RANGE_ NODES_ PER_ SEGMENT - Long Range nodes per
GET_LONG_RANGE_NODESsegment (128 bytes of mask).
Functions§
- encode_
cc_ list - Encodes a command class list (no controlled part).
- encode_
long_ range_ nodes - Encodes a
GET_LONG_RANGE_NODESresponse (simulators). - encode_
node_ mask - Encodes a node bit mask of
lenbytes starting at node 1. - get_
routing_ info - Builds a
GET_ROUTING_INFOrequest. - is_
response - Whether a frame is the response to
function. - node_
bytes - Appends a node id as
lenbytes (1 classic, 2 when the Serial API uses 16-bit node ids). - nvm_
request - Builds an NVM operation request.
- nvm_
write - Builds an NVM write of
dataatoffset. - parse_
cc_ list - Parses a command class list, with two-byte ids from
0xF1, splitting supported from controlled at the0xEFmark. - parse_
long_ range_ nodes - A
GET_LONG_RANGE_NODESresponse: more segments follow, the segment, and its nodes. - parse_
node_ id - The node id at the start of a payload,
lenbytes wide. - parse_
node_ mask - Parses a node bit mask (bit 0 of byte 0 is node
first). - parse_
routing_ info - Neighbor table of a node (
GET_ROUTING_INFOresponse). - send_
data - Builds a SendData request with node ids of
node_id_lenbytes.