CSIDataPacket

Struct CSIDataPacket 

Source
pub struct CSIDataPacket {
Show 25 fields pub mac: [u8; 6], pub rssi: i32, pub timestamp: u32, pub rate: u32, pub sgi: u32, pub secondary_channel: u32, pub channel: u32, pub bandwidth: u32, pub antenna: u32, pub sig_mode: u32, pub mcs: u32, pub smoothing: u32, pub not_sounding: u32, pub aggregation: u32, pub stbc: u32, pub fec_coding: u32, pub ampdu_cnt: u32, pub noise_floor: i32, pub rx_state: u32, pub sig_len: u32, pub date_time: Option<DateTime>, pub sequence_number: u16, pub data_format: RxCSIFmt, pub csi_data_len: u16, pub csi_data: Vec<i8, 612>,
}
Expand description

CSI Received Packet w/ Radio Metadata

Fields§

§mac: [u8; 6]

MAC address of the sender.

§rssi: i32

Received Signal Strength Indicator.

§timestamp: u32

Local Timestamp of Recieved Packet (microseconds) .

§rate: u32

PHY rate encoding of the packet. Only valid for non HT(11bg) packet.

§sgi: u32

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

§secondary_channel: u32

Secondary Channel on which the Packet was Received. 0: none; 1: above; 2: below.

§channel: u32

Primary channel on which the Packet was Received.

§bandwidth: u32

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

§antenna: u32

Antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1.

§sig_mode: u32

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

§mcs: u32

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

§smoothing: u32

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

§not_sounding: u32

Sounding PPDU is used for channel estimation by the request receiver. Set to 0 indicates that PPDU is a sounding PPDU. Set to 1 indicates that the PPDU is not a sounding PPDU.

§aggregation: u32

Aggregation. 0: MPDU packet; 1: AMPDU packet

§stbc: u32

Space-Time Block Coding. 0: non STBC packet; 1: STBC packet.

§fec_coding: u32

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

§ampdu_cnt: u32

The number of subframes aggregated in AMPDU.

§noise_floor: i32

Noise floor of Radio Frequency Module(RF). unit: dBm.

§rx_state: u32

RX state. 0: no error; others: error numbers which are not public.

§sig_len: u32

Length of packet including Frame Check Sequence(FCS).

§date_time: Option<DateTime>

Optional NTP-based Timestamp Indicating the Time CSI Captured.

§sequence_number: u16

Sequence Number Associated with the ICMP Echo Request Packet that triggered a CSI capture.

§data_format: RxCSIFmt

Data format of the recieved CSI. RxCSIFmt is a Compact Representation of the Different Recieved CSI Data Format Options as defined in the ESP WiFi Driver.

§csi_data_len: u16

Length of CSI data.

§csi_data: Vec<i8, 612>

Raw CSI data, largest case size is 612 bytes.

Implementations§

Source§

impl CSIDataPacket

Source

pub fn print_csi_w_metadata(&self)

Prints Recieved CSI Data Packet with it’s Metadata

Source

pub fn csi_fmt_from_params(&mut self)

Source

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

Source

pub fn rssi(&self) -> i32

Source

pub fn timestamp(&self) -> u32

Source

pub fn rate(&self) -> u32

Source

pub fn sgi(&self) -> u32

Source

pub fn secondary_channel(&self) -> u32

Source

pub fn channel(&self) -> u32

Source

pub fn bandwidth(&self) -> u32

Source

pub fn antenna(&self) -> u32

Source

pub fn sig_mode(&self) -> u32

Source

pub fn mcs(&self) -> u32

Source

pub fn smoothing(&self) -> u32

Source

pub fn not_sounding(&self) -> u32

Source

pub fn aggregation(&self) -> u32

Source

pub fn stbc(&self) -> u32

Source

pub fn fec_coding(&self) -> u32

Source

pub fn ampdu_cnt(&self) -> u32

Source

pub fn noise_floor(&self) -> i32

Source

pub fn rx_state(&self) -> u32

Source

pub fn sig_len(&self) -> u32

Source

pub fn date_time(&self) -> Option<&DateTime>

Source

pub fn sequence_number(&self) -> u16

Source

pub fn data_format(&self) -> RxCSIFmt

Source

pub fn csi_data_len(&self) -> u16

Source

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

Trait Implementations§

Source§

impl Clone for CSIDataPacket

Source§

fn clone(&self) -> CSIDataPacket

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CSIDataPacket

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

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

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.