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§

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).
KeyArg
A 32-byte public key or channel key, written as base58 or hex.
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.
OnOffArg
An on/off switch, also accepting the true/false and 1/0 spellings the provisioning file has always allowed.
OptRegionArg
One region code, or none to clear the setting.
PeerArg
PUB,KENC,KMIC (or whitespace-separated): a peer public key and the two 16-byte pairwise secrets, hex.
PinArg
A 6-digit BLE pairing PIN, or clear to remove the stored one.
RegionListArg
A comma-separated region list, or none for the empty list — which means “no regional restriction”, not a region named “none”.

Functions§

parse_bool
parse_hex
parse_key32
parse_region 🔒
Parse one region code, rejecting the empty element a stray comma leaves behind. Anything that is not an airport code or 0x literal is hashed as a region name, so this only fails on empty input.
parse_u32
A number written in decimal or with an 0x prefix.