Skip to main content

Reporting

Enum Reporting 

Source
#[non_exhaustive]
pub enum Reporting { Report { to: ReportTo, }, ThresholdBased(Threshold), Decimate(u16), None, }
Expand description

Whether, and how often, a node’s measurements leave it.

Every variant except None delivers measurements; they differ in which ones. A node that reports nothing is not an idle node — it is one that must exist for the measurement to happen but contributes no data: the responder an initiator needs something to sound, a node that keeps traffic on the channel while another measures, or a receiver with its output switched off to separate acquisition cost from delivery cost.

ThresholdBased is IEEE 802.11bf’s threshold-based reporting: the node reports only while the channel is changing. It is useful well before 802.11bf hardware exists, because gating delivery on motion on the device takes the load off a USB or UART link. Decimate thins a steady stream to every nth measurement.

Whether a node reports at all is also an ESP-NOW protocol field. An initiator announces it in ControlPacket::initiator_reports, and a responder that hears an initiator reporting None promotes itself to Report { to: Host } so the pair still produces a dataset. That promotion happens at runtime and does not rewrite the node’s configuration, so CsiNode::reporting reports what was configured while runtime_reporting reports what is in force.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Report

Report every measurement — its own, and any reported to it by peers — to to.

Fields

§to: ReportTo

Where the measurements go.

§

ThresholdBased(Threshold)

Report only while the channel is moving: IEEE 802.11bf threshold-based reporting. See Threshold.

§

Decimate(u16)

Report every nth measurement. Decimate(1) reports everything; 0 is treated as 1.

§

None

Report nothing. Participates in the channel and in capture without contributing data or paying the delivery cost.

Implementations§

Source§

impl Reporting

Source

pub const HOST: Self

Report { to: ReportTo::Host }: report every measurement to the host. The default.

Source

pub const fn reports(self) -> bool

Whether this reports anything at all — everything except None.

Trait Implementations§

Source§

impl Clone for Reporting

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Reporting

Source§

impl Debug for Reporting

Source§

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

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

impl Default for Reporting

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Reporting

Source§

impl PartialEq for Reporting

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Reporting

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.