pub enum Command {
Show 23 variants
Info(InfoArgs),
Provision(ProvisionArgs),
Identity {
op: Option<IdentityOp>,
},
Name {
name: Option<String>,
},
Save,
Restore,
Clear,
Reset,
FactoryReset {
yes: bool,
},
Pin {
value: PinArg,
},
Phy {
op: Option<PhyOp>,
},
Duty {
op: Option<DutyOp>,
},
Repeater {
op: Option<RepeaterOp>,
},
Time {
op: Option<TimeOp>,
},
Gnss {
op: Option<GnssOp>,
},
Advert {
op: Option<AdvertOp>,
},
DevChannel {
op: Option<TableOp>,
},
DevPeer {
op: Option<TableOp>,
},
Illuminance,
Alert {
op: Option<AlertOp>,
},
Capture(CaptureArgs),
Scan {
timeout: u64,
},
Default {
op: Option<DefaultOp>,
},
}Variants§
Info(InfoArgs)
Print capabilities, ownership, PHY state, and provisioning digests. Changes nothing.
Provision(ProvisionArgs)
Establish host provisioning: keys, filters, and the delegation policy for the host that will tether to this device.
Identity
Show or generate the device identity public key.
Fields
op: Option<IdentityOp>Name
Show or set the human-readable device name.
Save
Persist live state across reboots (CMD_SAVE).
Restore
Revert live state to the saved snapshot.
Clear
Erase persisted state; live state keeps running.
Reset
Protocol reset (CMD_RST): state returns to its post-reset values, restoring any saved snapshot. The MCU does not reboot.
FactoryReset
Erase ALL state including BLE bonds and the pairing PIN, then reboot into a blank factory state.
Pin
Set or clear the persisted BLE pairing PIN.
Phy
Show or set the PHY enable state and LoRa parameters.
Duty
Show duty-cycle usage, or bound it.
Repeater
Show or set the autonomous repeater forwarding policy.
Fields
op: Option<RepeaterOp>Time
Show or set the device’s wall clock and time zone.
Gnss
Show or set the GNSS receiver and what is done with its fixes.
Advert
Show or set what the device announces on its own schedule.
DevChannel
Device-identity channel keys: the multicast this device’s own node joins.
DevPeer
Device-identity peer public keys.
Illuminance
Take one ambient light reading.
Alert
Show or drive the locate alert: make the radio conspicuous so it can be found.
Capture(CaptureArgs)
Listen on the device’s radio, decoding frames and optionally writing a Wireshark-compatible capture.
Scan
List nearby ULCP radios without connecting.
Default
Show, set, or clear the radio this tool reaches for when the command line names none.
Implementations§
Source§impl Command
impl Command
Sourcepub fn needs_device(&self) -> bool
pub fn needs_device(&self) -> bool
Whether this command needs an attached device.
Sourcepub fn needs_tethered(&self) -> bool
pub fn needs_tethered(&self) -> bool
Whether this command needs a tethered attach rather than the administrative one everything else uses.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Check whatever clap’s grammar cannot — combinations of flags, and the provisioning file — before a device is opened.
Connecting takes seconds over BLE and disturbs a radio that was minding its own business; an argument mistake should cost neither.
pub async fn run(self, app: &mut App) -> Result<()>
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand