Trait openthread::ot::Thread
source · pub trait Thread {
Show 28 methods
// Required methods
fn become_leader(&self) -> Result;
fn become_router(&self) -> Result;
fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>;
fn get_leader_data(&self) -> Result<LeaderData>;
fn get_leader_weight(&self) -> u8;
fn get_network_key(&self) -> NetworkKey;
fn set_network_key(&self, key: &NetworkKey) -> Result;
fn get_network_name_as_slice(&self) -> &[u8] ⓘ;
fn set_network_name(&self, name: &NetworkName) -> Result;
fn is_singleton(&self) -> bool;
fn get_extended_pan_id(&self) -> &ExtendedPanId;
fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result;
fn thread_set_enabled(&self, enabled: bool) -> Result;
fn get_device_role(&self) -> DeviceRole;
fn get_partition_id(&self) -> u32;
fn get_rloc16(&self) -> u16;
fn get_link_mode(&self) -> LinkModeConfig;
fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result;
fn get_rloc(&self) -> Ipv6Addr;
fn get_mesh_local_eid(&self) -> Ipv6Addr;
fn get_link_local_addr(&self) -> Ipv6Addr;
fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr;
fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix;
fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>;
fn get_ip6_counters(&self) -> &IpCounters;
fn iter_next_neighbor_info(
&self,
ot_iter: &mut otNeighborInfoIterator
) -> Option<NeighborInfo>;
// Provided methods
fn get_network_name(&self) -> NetworkName { ... }
fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ { ... }
}
Expand description
Methods from the OpenThread “Thread General” Module.
Required Methods§
sourcefn become_leader(&self) -> Result
fn become_leader(&self) -> Result
Functional equivalent of
otsys::otThreadBecomeLeader
.
sourcefn become_router(&self) -> Result
fn become_router(&self) -> Result
Functional equivalent of
otsys::otThreadBecomeRouter
.
sourcefn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
Functional equivalent of
otsys::otThreadGetChildInfoById
.
sourcefn get_leader_data(&self) -> Result<LeaderData>
fn get_leader_data(&self) -> Result<LeaderData>
Functional equivalent of
otsys::otThreadGetLeaderData
.
sourcefn get_leader_weight(&self) -> u8
fn get_leader_weight(&self) -> u8
Functional equivalent of
otsys::otThreadGetLeaderWeight
.
sourcefn get_network_key(&self) -> NetworkKey
fn get_network_key(&self) -> NetworkKey
Functional equivalent of
otsys::otThreadGetNetworkKey
.
sourcefn set_network_key(&self, key: &NetworkKey) -> Result
fn set_network_key(&self, key: &NetworkKey) -> Result
Functional equivalent of
otsys::otThreadSetNetworkKey
.
sourcefn get_network_name_as_slice(&self) -> &[u8] ⓘ
fn get_network_name_as_slice(&self) -> &[u8] ⓘ
Functional equivalent of
otsys::otThreadGetNetworkName
.
sourcefn set_network_name(&self, name: &NetworkName) -> Result
fn set_network_name(&self, name: &NetworkName) -> Result
Functional equivalent of
otsys::otThreadSetNetworkName
.
sourcefn is_singleton(&self) -> bool
fn is_singleton(&self) -> bool
Functional equivalent of
otsys::otThreadIsSingleton
.
sourcefn get_extended_pan_id(&self) -> &ExtendedPanId
fn get_extended_pan_id(&self) -> &ExtendedPanId
Functional equivalent of
otsys::otThreadGetExtendedPanId
.
sourcefn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
Functional equivalent of
otsys::otThreadSetExtendedPanId
.
sourcefn thread_set_enabled(&self, enabled: bool) -> Result
fn thread_set_enabled(&self, enabled: bool) -> Result
Functional equivalent of otsys::otThreadSetEnabled
.
sourcefn get_device_role(&self) -> DeviceRole
fn get_device_role(&self) -> DeviceRole
Functional equivalent of
otsys::otThreadGetDeviceRole
.
sourcefn get_partition_id(&self) -> u32
fn get_partition_id(&self) -> u32
Functional equivalent of
otsys::otThreadGetPartitionId
.
sourcefn get_rloc16(&self) -> u16
fn get_rloc16(&self) -> u16
Functional equivalent of otsys::otThreadGetRloc16
.
sourcefn get_link_mode(&self) -> LinkModeConfig
fn get_link_mode(&self) -> LinkModeConfig
Functional equivalent of otsys::otThreadGetLinkMode
.
sourcefn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
Functional equivalent of otsys::otThreadSetLinkMode
.
sourcefn get_mesh_local_eid(&self) -> Ipv6Addr
fn get_mesh_local_eid(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetMeshLocalEid
.
sourcefn get_link_local_addr(&self) -> Ipv6Addr
fn get_link_local_addr(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetLinkLocalIp6Address
.
sourcefn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetLinkLocalAllThreadNodesMulticastAddress
.
sourcefn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
Functional equivalent of
otsys::otThreadGetMeshLocalPrefix
.
sourcefn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
Fucntional equivalent of
otsys::otThreadGetRouterInfo
.
sourcefn get_ip6_counters(&self) -> &IpCounters
fn get_ip6_counters(&self) -> &IpCounters
Functional equivalent of
otsys::otThreadGetIp6Counters
.
sourcefn iter_next_neighbor_info(
&self,
ot_iter: &mut otNeighborInfoIterator
) -> Option<NeighborInfo>
fn iter_next_neighbor_info( &self, ot_iter: &mut otNeighborInfoIterator ) -> Option<NeighborInfo>
Functional equivalent of
otsys::otThreadGetNextNeighborInfo
.
Provided Methods§
sourcefn get_network_name(&self) -> NetworkName
fn get_network_name(&self) -> NetworkName
Similar to [get_network_name_as_slice
], but returns
an ot::NetworkName
.
sourcefn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
Returns an iterator for iterating over external routes.