Skip to main content

ThreadDriver

Trait ThreadDriver 

Source
pub trait ThreadDriver {
Show 26 methods // Provided methods fn channel(&self) -> Option<u16> { ... } fn routing_role(&self) -> Option<RoutingRoleEnum> { ... } fn network_name(&self) -> Option<&str> { ... } fn pan_id(&self) -> Option<u16> { ... } fn extended_pan_id(&self) -> Option<u64> { ... } fn mesh_local_prefix(&self) -> Option<&[u8]> { ... } fn overrun_count(&self) -> u64 { ... } fn neighbors(&self) -> &[NeighborTableStruct] { ... } fn routes(&self) -> &[RouteTableStruct] { ... } fn partition_id(&self) -> Option<u32> { ... } fn weighting(&self) -> Option<u16> { ... } fn data_version(&self) -> Option<u16> { ... } fn stable_data_version(&self) -> Option<u16> { ... } fn leader_router_id(&self) -> Option<u8> { ... } fn mle_counters(&self) -> MleCounters { ... } fn mac_counters(&self) -> MacCounters { ... } fn active_timestamp(&self) -> Option<u64> { ... } fn pending_timestamp(&self) -> Option<u64> { ... } fn delay(&self) -> Option<u32> { ... } fn security_policy(&self) -> Option<SecurityPolicy> { ... } fn channel_page0_mask(&self) -> Option<&[u8]> { ... } fn operational_dataset_components( &self, ) -> Option<OperationalDatasetComponents> { ... } fn active_network_faults(&self) -> &[NetworkFaultEnum] { ... } fn ext_address(&self) -> Option<u64> { ... } fn rloc16(&self) -> Option<u16> { ... } fn reset_counts(&self) { ... }
}
Expand description

What a device’s Thread stack can report (§11.14.6).

Every method has a default, so an integrator implements only what the stack exposes. The defaults are the conservative ones: null for the network state, empty for the tables, and no counters at all.

Provided Methods§

Source

fn channel(&self) -> Option<u16>

Channel (§11.14.6.1) — the 802.15.4 channel in use.

Source

fn routing_role(&self) -> Option<RoutingRoleEnum>

RoutingRole (§11.14.6.2).

RoutingRoleEnum::Unassigned and null are not the same answer: the first is a configured interface with no role yet, the second is no configured interface.

Source

fn network_name(&self) -> Option<&str>

NetworkName (§11.14.6.3), at most sixteen octets.

Source

fn pan_id(&self) -> Option<u16>

PanId (§11.14.6.4).

Source

fn extended_pan_id(&self) -> Option<u64>

ExtendedPanId (§11.14.6.5).

Source

fn mesh_local_prefix(&self) -> Option<&[u8]>

MeshLocalPrefix (§11.14.6.6) — an ipv6pre: one length octet, then the prefix.

Source

fn overrun_count(&self) -> u64

OverrunCount (§11.14.6.7) — packets dropped for want of buffer memory. ERRCNT.

The one counter here that is mandatory within its feature and not nullable, so it is a plain number: a device claiming ERRCNT has promised to count it.

Source

fn neighbors(&self) -> &[NeighborTableStruct]

NeighborTable (§11.14.6.8). Empty is a legitimate answer and null is not one.

Source

fn routes(&self) -> &[RouteTableStruct]

RouteTable (§11.14.6.9).

Source

fn partition_id(&self) -> Option<u32>

PartitionId (§11.14.6.10).

Source

fn weighting(&self) -> Option<u16>

Weighting (§11.14.6.11) — the leader weight this node’s partition is running at.

Source

fn data_version(&self) -> Option<u16>

DataVersion (§11.14.6.12).

Source

fn stable_data_version(&self) -> Option<u16>

StableDataVersion (§11.14.6.13).

Source

fn leader_router_id(&self) -> Option<u8>

LeaderRouterId (§11.14.6.14).

Source

fn mle_counters(&self) -> MleCounters

The MLECNT counters (§11.14.6).

Source

fn mac_counters(&self) -> MacCounters

The MACCNT counters (§11.14.6).

Called once per counter read, so a driver that has to ask the radio should cache: a wildcard read of this cluster asks for thirty-four of them in a row.

Source

fn active_timestamp(&self) -> Option<u64>

ActiveTimestamp (§11.14.6.57) of the Active Operational Dataset.

Source

fn pending_timestamp(&self) -> Option<u64>

PendingTimestamp (§11.14.6.58) of the Pending Operational Dataset.

Source

fn delay(&self) -> Option<u32>

Delay (§11.14.6.59) before a pending dataset is adopted, in milliseconds.

Source

fn security_policy(&self) -> Option<SecurityPolicy>

SecurityPolicy (§11.14.6.60).

Source

fn channel_page0_mask(&self) -> Option<&[u8]>

ChannelPage0Mask (§11.14.6.61) — the channel mask as an octet string.

Source

fn operational_dataset_components(&self) -> Option<OperationalDatasetComponents>

OperationalDatasetComponents (§11.14.6.62) — which parts of the dataset are present.

Source

fn active_network_faults(&self) -> &[NetworkFaultEnum]

ActiveNetworkFaultsList (§11.14.6.63) — the faults currently detected, if any.

Source

fn ext_address(&self) -> Option<u64>

ExtAddress (§11.14.6.64) — the node’s IEEE 802.15.4 extended address.

Source

fn rloc16(&self) -> Option<u16>

Rloc16 (§11.14.6.65) — the node’s routing locator.

Source

fn reset_counts(&self)

ResetCounts (§11.14.7.1): zero every counter this cluster reports.

The default does nothing, which is correct for a driver that reports no counters. One that does must implement this, or a client’s reset silently fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§