Skip to main content

Module message

Module message 

Source
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§

ApplicationCommand
A command class frame received from a node (APPLICATION_COMMAND_HANDLER or its bridge variant).
ControllerId
Response to GET_CONTROLLER_ID.
ControllerVersion
Response to GET_CONTROLLER_VERSION.
InitData
Response to GET_INIT_DATA.
Malformed
A payload that does not have the shape its function id promises.
NodeInfo
A node information frame: device classes and command classes.
NodeProtocolInfo
Response to GET_NODE_PROTOCOL_INFO.
NvmResponse
A response to an NVM operation.
RxStatus
Reception flags of a received frame.
SendDataResult
A SendData callback.
SerialApiCapabilities
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§

AddNodeStatus
Progress of an inclusion (ADD_NODE_TO_NETWORK callbacks).
ApplicationUpdate
APPLICATION_UPDATE frames.
RemoveNodeStatus
Progress of an exclusion (REMOVE_NODE_FROM_NETWORK callbacks).
RfRegion
An RF region.
TransmitStatus
How a SendData ended.

Constants§

LONG_RANGE_NODES_PER_SEGMENT
Long Range nodes per GET_LONG_RANGE_NODES segment (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_NODES response (simulators).
encode_node_mask
Encodes a node bit mask of len bytes starting at node 1.
get_routing_info
Builds a GET_ROUTING_INFO request.
is_response
Whether a frame is the response to function.
node_bytes
Appends a node id as len bytes (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 data at offset.
parse_cc_list
Parses a command class list, with two-byte ids from 0xF1, splitting supported from controlled at the 0xEF mark.
parse_long_range_nodes
A GET_LONG_RANGE_NODES response: more segments follow, the segment, and its nodes.
parse_node_id
The node id at the start of a payload, len bytes 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_INFO response).
send_data
Builds a SendData request with node ids of node_id_len bytes.