WifiCsiInfo

Struct WifiCsiInfo 

Source
pub struct WifiCsiInfo<'a> { /* private fields */ }
Available on crate features csi and unstable only.
Expand description

CSI (Channel State Information) packet metadata and associated packet details.

This structure contains the raw CSI data, along with necessary metadata from the received Wi-Fi packet (MAC addresses, sequence number, packet headers).

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Implementations§

Source§

impl<'a> WifiCsiInfo<'_>

Source

pub fn rssi(&self) -> i8

Received Signal Strength Indicator (RSSI) of the packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn rate(&self) -> u8

Data rate of the packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn packet_mode(&self) -> u8

Protocol of the received packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn modulation_coding_scheme(&self) -> u8

Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76).

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn cwb(&self) -> bool

Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn smoothing(&self) -> bool

Set to 1 indicates that channel estimate smoothing is recommended. Set to 0 indicates that only per-carrier independent (unsmoothed) channel estimate is recommended.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn not_sounding(&self) -> bool

Set to 1 indicates that the PPDU is not a sounding PPDU. Set to 0 indicates that PPDU is a sounding PPDU.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn aggregation(&self) -> bool

Aggregation. 0: MPDU packet; 1: AMPDU packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn space_time_block_code(&self) -> u8

Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn forward_error_correction_coding(&self) -> bool

Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn short_guide_interval(&self) -> bool

Short Guide Interval(SGI). 0: Long GI; 1: Short GI.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn noise_floor(&self) -> i8

Noise floor in dBm of Radio Frequency Module(RF).

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn ampdu_count(&self) -> u8

The number of subframes aggregated in AMPDU.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn channel(&self) -> u8

Primary channel on which this packet is received.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn secondary_channel(&self) -> SecondaryChannel

SecondaryChannel on which this packet is received.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn timestamp(&self) -> Instant

The local time in microseconds when this packet is received. It is precise only if modem sleep or light sleep is not enabled.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn antenna(&self) -> u8

Antenna number from which this packet is received. 0: Wi-Fi antenna 0; 1: Wi-Fi antenna 1.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn signal_length(&self) -> u16

The length of the reception MPDU.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn rx_state(&self) -> u8

State of the packet. 0: no error; others: failure.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn mac(&self) -> &[u8; 6]

Source MAC address of the CSI data.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn destination_mac(&self) -> &[u8; 6]

Destination MAC address of the CSI data.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn first_word_invalid(&self) -> bool

First four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limitation.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn buf(&self) -> &[i8]

Valid buffer of CSI data.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn header(&self) -> &[u8]

Header of the wifi packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn payload(&self) -> &[u8]

Payload of the wifi packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source

pub fn rx_sequence(&self) -> u16

Rx sequence number of the wifi packet.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Trait Implementations§

Source§

impl<'a> Debug for WifiCsiInfo<'a>

Source§

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

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

impl<'a> Format for WifiCsiInfo<'a>
where *const wifi_csi_info_t: Format, PhantomData<&'a ()>: Format,

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.

Auto Trait Implementations§

§

impl<'a> Freeze for WifiCsiInfo<'a>

§

impl<'a> RefUnwindSafe for WifiCsiInfo<'a>

§

impl<'a> !Send for WifiCsiInfo<'a>

§

impl<'a> !Sync for WifiCsiInfo<'a>

§

impl<'a> Unpin for WifiCsiInfo<'a>

§

impl<'a> UnwindSafe for WifiCsiInfo<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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
§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.