Skip to main content

MacConfig

Struct MacConfig 

Source
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

Source

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

Source

pub fn channel(channel: u8) -> Self

Tune the radio to a channel, leaving the addressing attributes alone.

Source

pub fn short_address(address: ShortAddress) -> Self

Apply an assigned short address, leaving channel and PAN id alone.

Trait Implementations§

Source§

impl Clone for MacConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MacConfig

Source§

impl Debug for MacConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MacConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for MacConfig

Source§

impl PartialEq for MacConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MacConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.