1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Measurement sources: anything that produces channel measurements for this node to deliver.
//!
//! Delivery, statistics and encoding consume [`CsiFrame`]s, not a radio's callback struct. The
//! Espressif vendor CSI callback is one source ([`EspVendorSource`]); a synthetic generator, an
//! out-of-tree driver, or — once a radio exposes one — an IEEE 802.11bf sensing procedure is
//! another. Each hands its frames to [`emit`], which applies the same publish gate, reporting
//! policy, envelope, per-transmitter statistics and delivery path as the built-in callback, so a
//! host cannot tell a source's frames from the callback's except by [`SourceKind`].
use CsiPacket;
use crate;
/// A producer of channel measurements.
///
/// Object-safe, so a node can hold sources of different kinds side by side.
/// The Espressif vendor CSI callback: the source every built-in mode uses.
///
/// Its frames do not pass through [`emit`] — the callback runs the same pipeline inline, with its
/// attribution filter and policy judged on the raw buffer before a packet is built — but they are
/// stamped with this source's kind.
;
/// Deliver a measurement from `source` through this node's pipeline.
///
/// Returns whether it was delivered: `false` when no consumer is installed, the node reports
/// `Never` or output is switched off, or the reporting policy withheld it. A delivered frame gets
/// this node's envelope (node id, session id, the next stream sequence number) and goes to exactly
/// one of the callback, the async queue or the logger, like any captured frame.
///
/// Callable from any task. It must not race the vendor CSI callback's own reporting-policy state, so
/// do not emit from a second source while a [`Threshold`](crate::Reporting::ThresholdBased) or
/// [`Decimate`](crate::Reporting::Decimate) policy is in force on a running ESP mode.