pub struct WifiCsiInfo<'a> { /* private fields */ }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<'_>
impl<'a> WifiCsiInfo<'_>
Sourcepub fn rssi(&self) -> i8
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.
Sourcepub fn rate(&self) -> u8
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.
Sourcepub fn packet_mode(&self) -> u8
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.
Sourcepub fn modulation_coding_scheme(&self) -> u8
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.
Sourcepub fn cwb(&self) -> bool
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.
Sourcepub fn smoothing(&self) -> bool
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.
Sourcepub fn not_sounding(&self) -> bool
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.
Sourcepub fn aggregation(&self) -> bool
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.
Sourcepub fn space_time_block_code(&self) -> u8
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.
Sourcepub fn forward_error_correction_coding(&self) -> bool
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.
Sourcepub fn short_guide_interval(&self) -> bool
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.
Sourcepub fn noise_floor(&self) -> i8
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.
Sourcepub fn ampdu_count(&self) -> u8
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.
Sourcepub fn channel(&self) -> u8
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.
Sourcepub fn secondary_channel(&self) -> SecondaryChannel
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.
Sourcepub fn timestamp(&self) -> Instant
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.
Sourcepub fn antenna(&self) -> u8
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.
Sourcepub fn signal_length(&self) -> u16
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.
Sourcepub fn rx_state(&self) -> u8
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.
Sourcepub fn mac(&self) -> &[u8; 6]
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.
Sourcepub fn destination_mac(&self) -> &[u8; 6]
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.
Sourcepub fn first_word_invalid(&self) -> bool
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.
Sourcepub fn buf(&self) -> &[i8]
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.
Sourcepub fn header(&self) -> &[u8]
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.
Sourcepub fn payload(&self) -> &[u8]
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.
Sourcepub fn rx_sequence(&self) -> u16
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.