Skip to main content

Request

Enum Request 

Source
pub enum Request {
Show 30 variants SysReset { soft: bool, }, SysPing, SysVersion, OsalNvItemInit { id: u16, len: u16, init: Vec<u8>, }, OsalNvRead { id: u16, offset: u8, }, OsalNvWrite { id: u16, offset: u8, value: Vec<u8>, }, OsalNvDelete { id: u16, len: u16, }, OsalNvLength { id: u16, }, SetTxPower { dbm: i8, }, NvLength { sysid: u8, item: u16, sub: u16, }, NvRead { sysid: u8, item: u16, sub: u16, offset: u16, len: u8, }, NvWrite { sysid: u8, item: u16, sub: u16, offset: u16, value: Vec<u8>, }, UtilGetDeviceInfo, ZdoSetLinkKey { nwk: NodeId, ieee: Ieee, key: Key, }, ZdoNwkDiscovery { channel_mask: u32, scan_duration: u8, }, ZdoSendData { destination: NodeId, tsn: u8, cluster: u16, data: Vec<u8>, }, ZdoMgmtPermitJoin { addr_mode: u8, destination: NodeId, duration: u8, tc_significance: u8, }, ZdoMgmtNwkUpdate { destination: NodeId, addr_mode: u8, channel_mask: u32, scan_duration: u8, scan_count: u8, manager: NodeId, }, ZdoMsgCbRegister { cluster: u16, }, ZdoStartupFromApp { delay: u16, }, ZdoExtNwkInfo, AfRegister { endpoint: u8, profile: u16, device_id: u16, version: u8, input_clusters: Vec<u16>, output_clusters: Vec<u16>, }, AfDataRequest { destination: NodeId, destination_endpoint: u8, source_endpoint: u8, cluster: u16, trans_id: u8, options: u8, radius: u8, data: Vec<u8>, }, AfDataRequestExt { addr_mode: u8, destination: u64, destination_endpoint: u8, destination_pan: u16, source_endpoint: u8, cluster: u16, trans_id: u8, options: u8, radius: u8, data: Vec<u8>, }, SetAllowRejoinTcPolicy { allow: bool, }, BdbAddInstallCode { format: u8, ieee: Ieee, code: Vec<u8>, }, BdbSetJoinUsesInstallCodeKey { required: bool, }, BdbStartCommissioning { mode: u8, }, BdbSetChannel { primary: bool, channel_mask: u32, }, BdbSetTcRequireKeyExchange { required: bool, },
}
Expand description

A request from the host.

Variants§

§

SysReset

SYS_RESET_REQ (asynchronous; the NCP answers with a reset indication).

Fields

§soft: bool

Soft (1) or hard (0) reset.

§

SysPing

SYS_PING.

§

SysVersion

SYS_VERSION.

§

OsalNvItemInit

SYS_OSAL_NV_ITEM_INIT.

Fields

§id: u16

Item.

§len: u16

Item length.

§init: Vec<u8>

Initial value.

§

OsalNvRead

SYS_OSAL_NV_READ.

Fields

§id: u16

Item.

§offset: u8

Offset.

§

OsalNvWrite

SYS_OSAL_NV_WRITE.

Fields

§id: u16

Item.

§offset: u8

Offset.

§value: Vec<u8>

Value.

§

OsalNvDelete

SYS_OSAL_NV_DELETE.

Fields

§id: u16

Item.

§len: u16

Its length.

§

OsalNvLength

SYS_OSAL_NV_LENGTH.

Fields

§id: u16

Item.

§

SetTxPower

SYS_SET_TX_POWER.

Fields

§dbm: i8

dBm.

§

NvLength

SYS_NV_LENGTH (extended NV).

Fields

§sysid: u8

System id.

§item: u16

Item.

§sub: u16

Sub-item.

§

NvRead

SYS_NV_READ (extended NV).

Fields

§sysid: u8

System id.

§item: u16

Item.

§sub: u16

Sub-item.

§offset: u16

Offset.

§len: u8

Bytes to read.

§

NvWrite

SYS_NV_WRITE (extended NV).

Fields

§sysid: u8

System id.

§item: u16

Item.

§sub: u16

Sub-item.

§offset: u16

Offset.

§value: Vec<u8>

Value.

§

UtilGetDeviceInfo

UTIL_GET_DEVICE_INFO.

§

ZdoSetLinkKey

ZDO_SET_LINK_KEY.

Fields

§nwk: NodeId

The device’s network address.

§ieee: Ieee

Its IEEE address.

§key: Key

The key.

§

ZdoNwkDiscovery

ZDO_NWK_DISCOVERY_REQ: an active scan.

Fields

§channel_mask: u32

Channels.

§scan_duration: u8

Scan duration exponent per channel.

§

ZdoSendData

ZDO_SEND_DATA: a raw ZDO frame with the host’s sequence number.

Fields

§destination: NodeId

Destination.

§tsn: u8

ZDO sequence number.

§cluster: u16

ZDO cluster.

§data: Vec<u8>

The ZDO payload after the sequence number.

§

ZdoMgmtPermitJoin

ZDO_MGMT_PERMIT_JOIN_REQ.

Fields

§addr_mode: u8

Address mode (crate::ids::addr_mode).

§destination: NodeId

Destination.

§duration: u8

Seconds; 0 closes.

§tc_significance: u8

Trust center significance.

§

ZdoMgmtNwkUpdate

ZDO_MGMT_NWK_UPDATE_REQ.

Fields

§destination: NodeId

Destination.

§addr_mode: u8

Address mode.

§channel_mask: u32

Channels.

§scan_duration: u8

Scan duration, or 0xFE to change channel.

§scan_count: u8

Scans per channel.

§manager: NodeId

Network manager.

§

ZdoMsgCbRegister

ZDO_MSG_CB_REGISTER.

Fields

§cluster: u16

Cluster, or 0xFFFF for every ZDO cluster.

§

ZdoStartupFromApp

ZDO_STARTUP_FROM_APP.

Fields

§delay: u16

Delay, milliseconds.

§

ZdoExtNwkInfo

ZDO_EXT_NWK_INFO.

§

AfRegister

AF_REGISTER.

Fields

§endpoint: u8

Endpoint.

§profile: u16

Profile.

§device_id: u16

Device id.

§version: u8

Device version.

§input_clusters: Vec<u16>

Server clusters.

§output_clusters: Vec<u16>

Client clusters.

§

AfDataRequest

AF_DATA_REQUEST.

Fields

§destination: NodeId

Destination.

§destination_endpoint: u8

Destination endpoint.

§source_endpoint: u8

Source endpoint.

§cluster: u16

Cluster.

§trans_id: u8

Transaction id, named again in the confirm.

§options: u8
§radius: u8

Radius.

§data: Vec<u8>

Payload.

§

AfDataRequestExt

AF_DATA_REQUEST_EXT.

Fields

§addr_mode: u8

Address mode.

§destination: u64

Destination: a group, network or IEEE address.

§destination_endpoint: u8

Destination endpoint.

§destination_pan: u16

Destination PAN (0 for this one).

§source_endpoint: u8

Source endpoint.

§cluster: u16

Cluster.

§trans_id: u8

Transaction id.

§options: u8

Options.

§radius: u8

Radius.

§data: Vec<u8>

Payload.

§

SetAllowRejoinTcPolicy

APP_CNF_SET_ALLOWREJOIN_TC_POLICY.

Fields

§allow: bool

Allow.

§

BdbAddInstallCode

APP_CNF_BDB_ADD_INSTALLCODE.

Fields

§format: u8

1: install code with CRC; 2: derived key.

§ieee: Ieee

The device.

§code: Vec<u8>

The code or key.

§

BdbSetJoinUsesInstallCodeKey

APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY.

Fields

§required: bool

Only devices with an install code may join.

§

BdbStartCommissioning

APP_CNF_BDB_START_COMMISSIONING.

Fields

§

BdbSetChannel

APP_CNF_BDB_SET_CHANNEL.

Fields

§primary: bool

The primary (or secondary) channel set.

§channel_mask: u32

Channels.

§

BdbSetTcRequireKeyExchange

APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE.

Fields

§required: bool

Required.

Implementations§

Source§

impl Request

Source

pub fn kind(&self) -> Kind

The frame type: everything but a reset is synchronous.

Source

pub fn command(&self) -> (u8, u8)

Subsystem and command id.

Source

pub fn encode(&self) -> Frame

The frame; Frame::encode refuses one over 250 bytes.

Source

pub fn decode(frame: &Frame) -> Result<Request, DecodeError>

Decode a request (the simulator’s side).

Trait Implementations§

Source§

impl Clone for Request

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 Request

Source§

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

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

impl Eq for Request

Source§

impl PartialEq for Request

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 Request

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