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§
- Assign
Arg PROP=HEX: one entry of a write sequence.- Bytes
Arg - 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.
- Channel
Arg - A channel, named or given by its raw 32-byte key.
- Duty
Limit Arg - A raw duty limit on the 0-65535 scale, or
offto stop enforcing one. - Filter
Arg dest-hint:HHHHHH,channel-id:HHHH, orpkt-type:N(:or whitespace between type and value).- HexU16
Arg - A 16-bit value written in decimal or hex (
0x1424). - Hint
Prefix Arg - 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.
- MinRssi
Arg - A received-signal floor in dBm, or
noneto forward regardless. - MinSnr
Arg - A signal-to-noise floor in dB, or
noneto forward regardless. - OptRegion
Arg - One region code, or
noneto clear the setting. - PinArg
- A 6-digit BLE pairing PIN, or
clearto remove the stored one. - Region
Arg - One region string, for the entry-at-a-time edits.
- Region
Code Arg - One region code to stamp on an outgoing frame.
- Region
List Arg - A comma-separated region list, or
nonefor the empty list — which means “no regional restriction”, not a region named “none”. - Route
Arg - 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
0xliteral. 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
0xprefix.