openthread::ot

Trait Link

Source
pub trait Link {
Show 17 methods // Required methods fn get_channel(&self) -> ChannelIndex; fn set_channel(&self, index: ChannelIndex) -> Result; fn link_get_counters(&self) -> &MacCounters; fn get_extended_address(&self) -> &ExtAddress; fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress; fn get_pan_id(&self) -> PanId; fn set_pan_id(&self, pan_id: PanId) -> Result; fn get_short_address(&self) -> ShortAddress; fn link_is_enabled(&self) -> bool; fn link_set_enabled(&self, enabled: bool) -> Result; fn link_is_promiscuous(&self) -> bool; fn link_set_promiscuous(&self, promiscuous: bool) -> Result; fn is_energy_scan_in_progress(&self) -> bool; fn is_active_scan_in_progress(&self) -> bool; fn get_supported_channel_mask(&self) -> ChannelMask ; fn start_active_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result where F: FnMut(Option<&ActiveScanResult>) + 'a; fn start_energy_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result where F: FnMut(Option<&EnergyScanResult>) + 'a;
}
Expand description

Methods from the OpenThread “Link” Module.

Required Methods§

Source

fn get_channel(&self) -> ChannelIndex

Functional equivalent of otsys::otLinkGetChannel.

Source

fn set_channel(&self, index: ChannelIndex) -> Result

Functional equivalent of otsys::otLinkSetChannel.

Functional equivalent of otsys::otLinkGetCounters.

Source

fn get_extended_address(&self) -> &ExtAddress

Functional equivalent of otsys::otLinkGetExtendedAddress.

Source

fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress

Functional equivalent of otsys::otLinkGetFactoryAssignedIeeeEui64.

Source

fn get_pan_id(&self) -> PanId

Functional equivalent of otsys::otLinkGetPanId.

Source

fn set_pan_id(&self, pan_id: PanId) -> Result

Functional equivalent of otsys::otLinkSetPanId.

Source

fn get_short_address(&self) -> ShortAddress

Functional equivalent of otsys::otLinkGetShortAddress.

Functional equivalent of otsys::otLinkIsEnabled.

Functional equivalent of otsys::otLinkSetEnabled.

Functional equivalent of otsys::otLinkIsPromiscuous.

Functional equivalent of otsys::otLinkSetPromiscuous.

Source

fn is_energy_scan_in_progress(&self) -> bool

Functional equivalent of otsys::otLinkIsEnergyScanInProgress.

Source

fn is_active_scan_in_progress(&self) -> bool

Functional equivalent of otsys::otLinkIsActiveScanInProgress.

Source

fn get_supported_channel_mask(&self) -> ChannelMask

Functional equivalent of otsys::otLinkGetSupportedChannelMask.

Source

fn start_active_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
where F: FnMut(Option<&ActiveScanResult>) + 'a,

Starts an active scan. Functional equivalent of otsys::otLinkActiveScan.

The closure will ultimately be executed via ot::Tasklets::process.

Source

fn start_energy_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
where F: FnMut(Option<&EnergyScanResult>) + 'a,

Starts an energy scan. Functional equivalent of otsys::otLinkEnergyScan.

The closure will ultimately be executed via ot::Tasklets::process.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§