pub struct Data { /* private fields */ }Expand description
Beacon data structure.
Implementations§
Source§impl Data
impl Data
Sourcepub const fn new(
channel: u8,
lqi: u8,
rssi: i8,
depth: u8,
nwk_update_id: u8,
power: i8,
parent_priority: i8,
pan_id: PanId,
extended_pan_id: MacAddr8,
sender: u16,
enhanced: bool,
permit_join: bool,
has_capacity: bool,
) -> Self
pub const fn new( channel: u8, lqi: u8, rssi: i8, depth: u8, nwk_update_id: u8, power: i8, parent_priority: i8, pan_id: PanId, extended_pan_id: MacAddr8, sender: u16, enhanced: bool, permit_join: bool, has_capacity: bool, ) -> Self
Create a new beacon data structure.
Sourcepub const fn nwk_update_id(&self) -> u8
pub const fn nwk_update_id(&self) -> u8
Return the network update ID of the received beacon.
Sourcepub const fn power(&self) -> Option<i8>
pub const fn power(&self) -> Option<i8>
Return the power level of the received beacon.
This field is valid only if the beacon is an enhanced beacon.
Sourcepub const fn parent_priority(&self) -> i8
pub const fn parent_priority(&self) -> i8
Return the TC connectivity and long uptime from capacity field.
Sourcepub const fn extended_pan_id(&self) -> MacAddr8
pub const fn extended_pan_id(&self) -> MacAddr8
Return the extended PAN ID of the received beacon.
Sourcepub const fn permit_join(&self) -> bool
pub const fn permit_join(&self) -> bool
Return whether the beacon is advertising permit join.
Sourcepub const fn has_capacity(&self) -> bool
pub const fn has_capacity(&self) -> bool
Return whether the beacon is advertising capacity.
Trait Implementations§
impl Eq for Data
Source§impl FromLeStream for Data
impl FromLeStream for Data
Source§fn from_le_stream<__LeStreamBytesIterator>(
bytes: __LeStreamBytesIterator,
) -> Option<Self>
fn from_le_stream<__LeStreamBytesIterator>( bytes: __LeStreamBytesIterator, ) -> Option<Self>
Parses a value from the front of a little-endian byte stream. Read more
impl StructuralPartialEq for Data
Source§impl ToLeStream for Data
impl ToLeStream for Data
Source§type Iter = Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<<u8 as ToLeStream>::Iter, <u8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <u8 as ToLeStream>::Iter>, <u8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <u16 as ToLeStream>::Iter>, <MacAddr8 as ToLeStream>::Iter>, <u16 as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>
type Iter = Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<<u8 as ToLeStream>::Iter, <u8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <u8 as ToLeStream>::Iter>, <u8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <i8 as ToLeStream>::Iter>, <u16 as ToLeStream>::Iter>, <MacAddr8 as ToLeStream>::Iter>, <u16 as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>, <bool as ToLeStream>::Iter>
Iterator returned by
to_le_stream.Source§fn to_le_stream(self) -> <Self as ToLeStream>::Iter
fn to_le_stream(self) -> <Self as ToLeStream>::Iter
Returns an iterator over the little-endian byte representation. Read more
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnsafeUnpin for Data
impl UnwindSafe for Data
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
Mutably borrows from an owned value. Read more