Skip to main content

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 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 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 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 rx_match1(&self) -> bool

Indicate whether the reception frame is from interface 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 rx_match2(&self) -> bool

Indicate whether the reception frame is from interface 2.

§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_match3(&self) -> bool

Indicate whether the reception frame is from interface 3.

§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 he_siga1(&self) -> u32

HE-SIGA1 or HT-SIG.

§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_end_state(&self) -> u8

Reception state, 0: successful, 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 he_siga2(&self) -> u16

HE-SIGA2.

§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 is_group(&self) -> bool

Indicate whether the reception is a group addressed frame.

§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_channel_estimate_length(&self) -> u32

The length of the channel information.

§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_channel_estimate_info_valid(&self) -> bool

Indicate the channel information is valid.

§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 cur_bb_format(&self) -> u8

The format of the reception frame.

§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 dump_length(&self) -> u32

The length of the reception MPDU excluding the FCS.

§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> UnsafeUnpin 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.