Skip to main content

Mode

Enum Mode 

Source
#[non_exhaustive]
pub enum Mode { EspNow(EspNowConfig), EspNowSimplex(SimplexConfig), Sniffer(WifiSnifferConfig), Station(WifiStationConfig), AccessPoint(WifiApConfig), Emitter(EmitterConfig), }
Expand description

How a node reaches the channel.

This is the model’s extension point and it is deliberately abstract: it names the link a node uses to take part in the network, not a property of CSI measurement itself. Any link that can excite a channel and yield a channel measurement can supply a mode.

Each variant admits only the attribute combinations that are meaningful for that link, and it admits them through its config type rather than through a rule written down somewhere:

ModeSession roleSensing roleReporting
EspNowinitiator or respondertransmitter-receiverany
EspNowSimplexsource: initiator; peer: respondersource: transmitter; peer: receiversource: none; peer: report
Sniffernone (observer)receiverreport, threshold-based or decimate — never None
Stationinitiator or nonetransmitter-receiver or receiverany
AccessPointinitiatorreceiverany
Emitternonetransmitternone

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

EspNow(EspNowConfig)

Connectionless symmetric exchange: auto-pairing, optional forced-PHY unicast replies, no AP and no association. The only mode that admits a star — one initiator against many responders.

§

EspNowSimplex(SimplexConfig)

Connectionless asymmetric exchange: the source owns all transmit airtime and the peer is receive-only after discovery. The highest CSI rate of any pairing here.

§

Sniffer(WifiSnifferConfig)

Promiscuous capture on a locked channel. The traffic is whatever is already on air, so this is the one mode that needs no second device — and the one that pairs with an emitter.

§

Station(WifiStationConfig)

Associates to an ESP softAP or a commercial router and measures the frames it receives.

§

AccessPoint(WifiApConfig)

Self-contained softAP with DHCP; associated stations generate the uplink that is measured.

§

Emitter(EmitterConfig)

Unassociated transmit-only sounding: force a TX PHY and loop-inject frames. Needs no peer, no handshake and no protocol, which is what lets it compose with anything.

Implementations§

Source§

impl Mode

Source

pub fn session_role(&self) -> Option<SessionRole>

This node’s IEEE 802.11bf session role, or None for a node that takes part in no session (an observer).

Computed, never stored: the modes that fix this attribute return a constant, and the modes that admit a choice delegate to their config. There is no second copy of the value on CsiNode that could disagree with the mode it was built from.

Source

pub fn sensing_role(&self) -> SensingRole

This node’s IEEE 802.11bf sensing role: whether it sends the sensing PPDUs, measures them, or both.

Source

pub fn reporting(&self) -> Reporting

Whether, and how often, this node’s measurements leave it, as configured. See runtime_reporting for the value in force.

Auto Trait Implementations§

§

impl Freeze for Mode

§

impl RefUnwindSafe for Mode

§

impl Send for Mode

§

impl Sync for Mode

§

impl Unpin for Mode

§

impl UnsafeUnpin for Mode

§

impl UnwindSafe for Mode

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> 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, !>

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.