pub struct MacConfig {
pub channel: Option<u8>,
pub pan_id: Option<PanId>,
pub short_address: Option<ShortAddress>,
pub promiscuous: Option<bool>,
pub auto_ack_rx: Option<bool>,
pub auto_ack_tx: Option<bool>,
}Expand description
MAC attributes the network layer programs (see Mlme::configure).
Every field is optional: None leaves that attribute as the implementation
has it, so a caller only states what it actually knows.
Fields§
§channel: Option<u8>phyCurrentChannel: the channel the network operates on.
pan_id: Option<PanId>macPANId of that network.
short_address: Option<ShortAddress>macShortAddress assigned to this device.
promiscuous: Option<bool>macPromiscuousMode (7.4.2): pass every frame up instead of filtering
on the addresses above.
auto_ack_rx: Option<bool>Acknowledge received frames that request it (7.5.6.4).
auto_ack_tx: Option<bool>Wait for the acknowledgement of transmitted frames that request it.
Implementations§
Source§impl MacConfig
impl MacConfig
Sourcepub fn joined(channel: u8, pan_id: PanId, short_address: ShortAddress) -> Self
pub fn joined(channel: u8, pan_id: PanId, short_address: ShortAddress) -> Self
Attributes of a device operating as a member of a network: filtering on its addresses, acknowledging and expecting acknowledgements.
Source§impl MacConfig
impl MacConfig
Sourcepub fn channel(channel: u8) -> Self
pub fn channel(channel: u8) -> Self
Tune the radio to a channel, leaving the addressing attributes alone.
Sourcepub fn short_address(address: ShortAddress) -> Self
pub fn short_address(address: ShortAddress) -> Self
Apply an assigned short address, leaving channel and PAN id alone.
Trait Implementations§
impl Copy for MacConfig
impl Eq for MacConfig
impl StructuralPartialEq for MacConfig
Auto Trait Implementations§
impl Freeze for MacConfig
impl RefUnwindSafe for MacConfig
impl Send for MacConfig
impl Sync for MacConfig
impl Unpin for MacConfig
impl UnsafeUnpin for MacConfig
impl UnwindSafe for MacConfig
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more