#[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:
| Mode | Session role | Sensing role | Reporting |
|---|---|---|---|
EspNow | initiator or responder | transmitter-receiver | any |
EspNowSimplex | source: initiator; peer: responder | source: transmitter; peer: receiver | source: none; peer: report |
Sniffer | none (observer) | receiver | report, threshold-based or decimate — never None |
Station | initiator or none | transmitter-receiver or receiver | any |
AccessPoint | initiator | receiver | any |
Emitter | none | transmitter | none |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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
impl Mode
Sourcepub fn session_role(&self) -> Option<SessionRole>
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.
Sourcepub fn sensing_role(&self) -> SensingRole
pub fn sensing_role(&self) -> SensingRole
This node’s IEEE 802.11bf sensing role: whether it sends the sensing PPDUs, measures them, or both.
Sourcepub fn reporting(&self) -> Reporting
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.