Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 36 variants Version { desired: u8, }, GetConfigurationValue { config_id: u8, }, SetConfigurationValue { config_id: u8, value: u16, }, AddEndpoint { endpoint: u8, profile_id: u16, device_id: u16, device_version: u8, input_clusters: Vec<u16>, output_clusters: Vec<u16>, }, SetPolicy { policy_id: u8, decision: u8, }, GetValue { value_id: u8, }, SetValue { value_id: u8, value: Vec<u8>, }, SetManufacturerCode { code: u16, }, NetworkInit { bitmask: u16, }, NetworkState, FormNetwork { parameters: NetworkParameters, }, LeaveNetwork { options: u8, }, PermitJoining { duration: u8, }, GetNetworkParameters, GetEui64, GetNodeId, SetInitialSecurityState { state: InitialSecurityState, }, ExportKey { context: SecManContext, }, GetNetworkKeyInfo, ExportLinkKeyByIndex { index: u8, }, ImportLinkKey { index: u8, ieee: Ieee, key: Key, }, EraseKeyTableEntry { index: u8, }, ImportTransientKey { ieee: Ieee, key: Key, }, ClearTransientLinkKeys, ClearKeyTable, SendUnicast { kind: u8, destination: NodeId, aps: ApsFrame, tag: u16, payload: Vec<u8>, }, SendBroadcast { alias: NodeId, destination: NodeId, nwk_sequence: u8, aps: ApsFrame, radius: u8, tag: u16, payload: Vec<u8>, }, SetConcentrator { on: bool, kind: u16, min_time: u16, max_time: u16, route_error_threshold: u8, delivery_failure_threshold: u8, max_hops: u8, }, SetSourceRouteDiscoveryMode { mode: u8, }, GetMfgToken { token_id: u8, }, SetMfgToken { token_id: u8, data: Vec<u8>, }, StartScan { scan_type: u8, channel_mask: u32, duration: u8, }, LookupEui64ByNodeId { node_id: NodeId, }, SetRadioPower { power: i8, }, Echo { data: Vec<u8>, }, Nop,
}
Expand description

A command from the host.

Variants§

§

Version

Negotiate the protocol version.

Fields

§desired: u8
§

GetConfigurationValue

Fields

§config_id: u8
§

SetConfigurationValue

Fields

§config_id: u8
§value: u16
§

AddEndpoint

Fields

§endpoint: u8
§profile_id: u16
§device_id: u16
§device_version: u8
§input_clusters: Vec<u16>
§output_clusters: Vec<u16>
§

SetPolicy

Fields

§policy_id: u8
§decision: u8
§

GetValue

Fields

§value_id: u8
§

SetValue

Fields

§value_id: u8
§value: Vec<u8>
§

SetManufacturerCode

Fields

§code: u16
§

NetworkInit

Fields

§bitmask: u16
§

NetworkState

§

FormNetwork

Fields

§

LeaveNetwork

Fields

§options: u8
§

PermitJoining

Fields

§duration: u8
§

GetNetworkParameters

§

GetEui64

§

GetNodeId

§

SetInitialSecurityState

§

ExportKey

Fields

§

GetNetworkKeyInfo

§

ExportLinkKeyByIndex

Fields

§index: u8
§

ImportLinkKey

Fields

§index: u8
§ieee: Ieee
§key: Key
§

EraseKeyTableEntry

Fields

§index: u8
§

ImportTransientKey

Fields

§ieee: Ieee
§key: Key
§

ClearTransientLinkKeys

§

ClearKeyTable

§

SendUnicast

Fields

§kind: u8
§destination: NodeId
§tag: u16
§payload: Vec<u8>
§

SendBroadcast

Fields

§alias: NodeId
§destination: NodeId
§nwk_sequence: u8
§radius: u8
§tag: u16
§payload: Vec<u8>
§

SetConcentrator

Fields

§on: bool
§kind: u16
§min_time: u16
§max_time: u16
§route_error_threshold: u8
§delivery_failure_threshold: u8
§max_hops: u8
§

SetSourceRouteDiscoveryMode

Fields

§mode: u8
§

GetMfgToken

Fields

§token_id: u8
§

SetMfgToken

Fields

§token_id: u8
§data: Vec<u8>
§

StartScan

Fields

§scan_type: u8
§channel_mask: u32
§duration: u8
§

LookupEui64ByNodeId

Fields

§node_id: NodeId
§

SetRadioPower

Fields

§power: i8
§

Echo

Fields

§data: Vec<u8>
§

Nop

Implementations§

Source§

impl Command

Source

pub fn frame_id(&self) -> u16

The frame id.

Source

pub fn encode(&self, v: ProtocolVersion) -> Vec<u8> ⓘ

Encode the parameters.

Source

pub fn decode( v: ProtocolVersion, frame_id: u16, params: &[u8], ) -> Result<Command, DecodeError>

Decode a command (the NCP side).

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

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

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

impl Eq for Command

Source§

impl PartialEq for Command

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more