Module values

Module values 

Source
Expand description

FromStr-backed value parsers for the command tree.

clap turns each of these into a typed argument, so a bad value is reported against the flag or positional that carried it instead of being re-checked by hand after parsing. The parsing rules themselves are unchanged from the hand-rolled tool these replaced.

Structs§

AssignArg
PROP=HEX: one entry of a write sequence.
BytesArg
A property value written as hex, of whatever length the property takes. Empty is a value too — it is how a string property is cleared.
ChannelArg
A channel, named or given by its raw 32-byte key.
DutyLimitArg
A raw duty limit on the 0-65535 scale, or off to stop enforcing one.
FilterArg
dest-hint:HHHHHH, channel-id:HHHH, or pkt-type:N (: or whitespace between type and value).
HexU16Arg
A 16-bit value written in decimal or hex (0x1424).
HintPrefixArg
The leading bytes of a node hint, as one to three hex octets.
KeyArg
A 32-byte public key or channel key, written as base58 or hex.
MicArg
A MIC size, written as its byte length.
MinRssiArg
A received-signal floor in dBm, or none to forward regardless.
MinSnrArg
A signal-to-noise floor in dB, or none to forward regardless.
OptRegionArg
One region code, or none to clear the setting.
PinArg
A 6-digit BLE pairing PIN, or clear to remove the stored one.
RegionArg
One region string, for the entry-at-a-time edits.
RegionCodeArg
One region code to stamp on an outgoing frame.
RegionListArg
A comma-separated region list, or none for the empty list — which means “no regional restriction”, not a region named “none”.
RouteArg
A comma-separated source route, first hop first.

Constants§

MAX_ROUTE_HOPS 🔒
The MAC’s ceiling on an explicit source route.

Functions§

parse_hex
parse_key32
parse_region 🔒
Parse one region string — a short code, a name, or a 0x literal. The string is what the device stores; deriving it here only proves it is within the bounds a device will accept, which rejects the empty element a stray comma leaves behind and anything past 24 octets.
parse_u32
A number written in decimal or with an 0x prefix.