Command

Enum Command 

Source
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

§

Name

Show or set the human-readable device name.

Fields

§

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.

Fields

§yes: bool

Confirm the wipe. Required outside the REPL, which asks.

§

Pin

Set or clear the persisted BLE pairing PIN.

Fields

§value: PinArg
§

Phy

Show or set the PHY enable state and LoRa parameters.

Fields

§

Duty

Show duty-cycle usage, or bound it.

Fields

§

Repeater

Show or set the autonomous repeater forwarding policy.

Fields

§

Time

Show or set the device’s wall clock and time zone.

Fields

§

Gnss

Show or set the GNSS receiver and what is done with its fixes.

Fields

§

Advert

Show or set what the device announces on its own schedule.

Fields

§

DevChannel

Device-identity channel keys: the multicast this device’s own node joins.

Fields

§

DevPeer

Device-identity peer public keys.

Fields

§

Illuminance

Take one ambient light reading.

§

Alert

Show or drive the locate alert: make the radio conspicuous so it can be found.

Fields

§

Capture(CaptureArgs)

Listen on the device’s radio, decoding frames and optionally writing a Wireshark-compatible capture.

§

Scan

List nearby ULCP radios without connecting.

Fields

§timeout: u64

Seconds to listen.

§

Default

Show, set, or clear the radio this tool reaches for when the command line names none.

Fields

Implementations§

Source§

impl Command

Source

pub fn needs_device(&self) -> bool

Whether this command needs an attached device.

Source

pub fn needs_tethered(&self) -> bool

Whether this command needs a tethered attach rather than the administrative one everything else uses.

Source

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.

Source

pub async fn run(self, app: &mut App) -> Result<()>

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,