pub enum ConnectivityState {
Inactive,
Ready,
Offline,
Attaching,
Attached,
Isolated,
Commissioning,
// some variants omitted
}
Expand description
LoWPAN Connectivity State
This enum describes the level of connectivity being provided by a device.
Variants§
Inactive
Inactive state.
In this state the device is unprovisioned and administratively disabled (inactive).
This state can always be explicitly entered by calling Leave
followed by SetActive(false)
.
Ready
Ready state.
In this state the device is provisioned for a network, but is administratively disabled (inactive).
This state can be directly entered with the following actions based on the current connectivity state:
INACTIVE
: by callingProvisionNetwork(...)
.ATTACHING
,ATTACHED
,ISOLATED
,COMMISSIONING
: by callingSetActive(false)
.
Offline
Offline state.
In this state the device is administratively enabled (active) but is not provisioned and thus has no network to attach to.
This state can be directly entered with the following actions based on the current connectivity state:
INACTIVE
: by callingSetActive(true)
.ATTACHING
,ATTACHED
,ISOLATED
,COMMISSIONING
: by callingLeave()
.
Attaching
Attaching state.
In this state the device is administratively enabled (active) and either provisioned for a network or shortly about to become provisioned for a network.
The interface enters this state when it starts the process of trying to find other nodes so that it can attach to any pre-existing network fragment, or when it is in the process of calculating the optimal values for unspecified parameters when forming a new network.
This state can be directly entered with the following actions based on the current connectivity state:
READY
: by callingSetActive(true)
OFFLINE
,ATTACHING
,ATTACHED
,ISOLATED
,COMMISSIONING
: by callingProvisionNetwork(...)
,FormNetwork(...)
, orJoinNetwork(...)
Attached
Attached state.
In this state the device is both administratively enabled (active) and provisioned for a network. The device is an active participant on the network and can communicate with peers.
This state usually implies that peers are available, but that may not actually be the case due to current network conditions or privacy-protecting measures.
This state cannot generally be entered directly, rather
the device will enter this state automatically from the
ATTACHING
or ISOLATED
states once connectivity has been
(re)established.
Isolated
Isolated state.
In this state the device is both administratively enabled (active) and provisioned for a network. However, the device has no connectivity because there are no peers in range on the provisioned network.
Once peer devices on the same network come into range
the connectivity state will eventually switch back to
ATTACHED
, indicating restored connectivity with at least
one peer.
This state cannot generally be entered directly, rather
the device may enter this state automatically from the
ATTACHING
or ATTACHED
states.
Commissioning
Commissioning state.
Currently unused, but will later be used to
support in-band commissioning. It is usually appropriate
to consider this as a synonym for the ATTACHING
state
except that the device remains unprovisioned.
Implementations§
Source§impl ConnectivityState
impl ConnectivityState
pub fn from_primitive(prim: i32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: i32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> i32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for ConnectivityState
impl Clone for ConnectivityState
Source§fn clone(&self) -> ConnectivityState
fn clone(&self) -> ConnectivityState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ConnectivityState
impl Debug for ConnectivityState
Source§impl<D: ResourceDialect> Decode<ConnectivityState, D> for ConnectivityState
impl<D: ResourceDialect> Decode<ConnectivityState, D> for ConnectivityState
Source§impl<D: ResourceDialect> Encode<ConnectivityState, D> for ConnectivityState
impl<D: ResourceDialect> Encode<ConnectivityState, D> for ConnectivityState
Source§impl Hash for ConnectivityState
impl Hash for ConnectivityState
Source§impl Ord for ConnectivityState
impl Ord for ConnectivityState
Source§fn cmp(&self, other: &ConnectivityState) -> Ordering
fn cmp(&self, other: &ConnectivityState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ConnectivityState
impl PartialEq for ConnectivityState
Source§impl PartialOrd for ConnectivityState
impl PartialOrd for ConnectivityState
Source§impl TypeMarker for ConnectivityState
impl TypeMarker for ConnectivityState
Source§type Owned = ConnectivityState
type Owned = ConnectivityState
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ConnectivityState
impl ValueTypeMarker for ConnectivityState
Source§type Borrowed<'a> = ConnectivityState
type Borrowed<'a> = ConnectivityState
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for ConnectivityState
impl Eq for ConnectivityState
impl StructuralPartialEq for ConnectivityState
Auto Trait Implementations§
impl Freeze for ConnectivityState
impl RefUnwindSafe for ConnectivityState
impl Send for ConnectivityState
impl Sync for ConnectivityState
impl Unpin for ConnectivityState
impl UnwindSafe for ConnectivityState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)