Skip to main content

EspMlme

Struct EspMlme 

Source
pub struct EspMlme<'a> { /* private fields */ }
Expand description

ESP32-C6 Mlme implementation.

The radio is a single shared resource: the inner state is held behind an async mutex so the trait’s &self methods can be driven concurrently from a receive task and a transmit path. The extended address is cached so it can be read without locking.

Implementations§

Source§

impl<'a> EspMlme<'a>

Source

pub fn new(ieee802154: Ieee802154<'a>, config: Config) -> Self

Source

pub fn ieee_address(&self) -> u64

The device’s IEEE 802.15.4 extended (EUI-64) address.

Trait Implementations§

Source§

impl Mlme for EspMlme<'_>

Source§

fn ieee_address(&self) -> IeeeAddress

The device’s IEEE (extended) address as provisioned by the hardware, e.g. read from efuse.
Source§

async fn configure(&self, config: MacConfig)

MLME-SET.request of the addressing attributes (IEEE 802.15.4 7.4.2) and the operating channel. Read more
Source§

async fn scan_network( &self, ty: ScanType, channels: Range<u8>, duration: u8, ) -> Result<ScanResult, MacError>

Source§

async fn associate( &self, channel: u8, dest: Address, capabilities: CapabilityInformation, ) -> Result<AssociationResponse, MacError>

Source§

async fn poll_data( &self, coord_address: Address, buf: &mut [u8], ) -> Result<(usize, u8), MacError>

MLME-POLL.request + data reception (IEEE 802.15.4 7.1.16.1). Read more
Source§

async fn receive(&self, buf: &mut [u8]) -> Result<(usize, u8), MacError>

Passively wait for and return the next inbound MAC data frame. Read more
Source§

async fn transmit_data( &self, dest: Address, payload: &[u8], ) -> Result<(), MacError>

Transmit a MAC data frame carrying the given NWK-layer payload. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for EspMlme<'a>

§

impl<'a> !RefUnwindSafe for EspMlme<'a>

§

impl<'a> Send for EspMlme<'a>

§

impl<'a> Sync for EspMlme<'a>

§

impl<'a> Unpin for EspMlme<'a>

§

impl<'a> UnsafeUnpin for EspMlme<'a>

§

impl<'a> UnwindSafe for EspMlme<'a>

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> 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, 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, <T as TryFrom<U>>::Error>

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.