|
ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
|
A consistent view of the sensing state at one instant. More...
#include <runtime_snapshot.h>
Public Attributes | |
| MotionState | motion_state {MotionState::IDLE} |
| Debounced motion state, after the motion_on_hits / motion_off_hits filter. | |
| float | movement_metric {0.0f} |
| Current motion metric, on a 0..1 probability scale for both detectors. | |
| float | threshold {RUNTIME_SEGMENTATION_THRESHOLD_DEFAULT} |
| Threshold movement_metric is compared against, on the same scale. | |
| int8_t | link_rssi_dbm {INT8_MIN} |
| RSSI of the packets behind this metric. | |
| uint8_t | link_channel {0} |
| Wi-Fi channel those packets arrived on. | |
| bool | calibrating {false} |
| Startup calibration is running; detection results are not valid yet. | |
| uint32_t | calibration_packets {0} |
| Packets observed by the current Lightweight startup calibrator. | |
| uint16_t | calibration_target_packets {0} |
| Packet budget for the current Lightweight startup calibrator. | |
| bool | ready_to_publish {false} |
| The runtime is calibrated, linked, and its output is safe to act on. | |
| float | startup_threshold {0.0f} |
| Threshold startup calibration settled on. | |
| const char * | detector_name {"unknown"} |
| Active detector label: "lightweight", "high_accuracy", or "stream" under RuntimeProfile::STREAM. | |
| RuntimeSubcarrierSource | subcarrier_source {RuntimeSubcarrierSource::FIXED_DEFAULT} |
| How fixed_subcarriers was chosen. | |
| SelectedSubcarriers | fixed_subcarriers {make_default_subcarriers()} |
| Subcarrier indices the detector is measuring on. | |
A consistent view of the sensing state at one instant.
Passed to every IRuntimeListener callback and returned by RuntimeFrontendController::snapshot(). It is a plain value type: copy it freely, and copy it if you need it past the callback that delivered it.
Read ready_to_publish before anything else. The runtime keeps emitting snapshots while it calibrates, and motion_state is not meaningful until that flag is true.
Definition at line 76 of file runtime_snapshot.h.
| MotionState espectre::RuntimeSnapshot::motion_state {MotionState::IDLE} |
Debounced motion state, after the motion_on_hits / motion_off_hits filter.
Definition at line 78 of file runtime_snapshot.h.
| float espectre::RuntimeSnapshot::movement_metric {0.0f} |
Current motion metric, on a 0..1 probability scale for both detectors.
Comparable to threshold, but not comparable across detectors: Lightweight and ML produce the number differently even though the scale matches.
Definition at line 85 of file runtime_snapshot.h.
| float espectre::RuntimeSnapshot::threshold {RUNTIME_SEGMENTATION_THRESHOLD_DEFAULT} |
Threshold movement_metric is compared against, on the same scale.
Definition at line 87 of file runtime_snapshot.h.
| int8_t espectre::RuntimeSnapshot::link_rssi_dbm {INT8_MIN} |
RSSI of the packets behind this metric.
INT8_MIN when unknown.
Definition at line 92 of file runtime_snapshot.h.
| uint8_t espectre::RuntimeSnapshot::link_channel {0} |
Wi-Fi channel those packets arrived on.
Zero when unknown.
Definition at line 94 of file runtime_snapshot.h.
| bool espectre::RuntimeSnapshot::calibrating {false} |
Startup calibration is running; detection results are not valid yet.
Definition at line 96 of file runtime_snapshot.h.
| uint32_t espectre::RuntimeSnapshot::calibration_packets {0} |
Packets observed by the current Lightweight startup calibrator.
Zero when calibration is not running. Lightweight can finish early once motion evidence is accepted, so this may stay below calibration_target_packets.
Definition at line 103 of file runtime_snapshot.h.
| uint16_t espectre::RuntimeSnapshot::calibration_target_packets {0} |
Packet budget for the current Lightweight startup calibrator.
Zero when calibration is not running. csi:/miss: on the status heartbeat are last-second pipeline rates, not remaining calibration work.
Definition at line 110 of file runtime_snapshot.h.
| bool espectre::RuntimeSnapshot::ready_to_publish {false} |
The runtime is calibrated, linked, and its output is safe to act on.
Gate every user-visible publication on this. It goes false again when the Wi-Fi link drops.
Definition at line 117 of file runtime_snapshot.h.
| float espectre::RuntimeSnapshot::startup_threshold {0.0f} |
Threshold startup calibration settled on.
Zero before it completes.
Definition at line 119 of file runtime_snapshot.h.
| const char* espectre::RuntimeSnapshot::detector_name {"unknown"} |
Active detector label: "lightweight", "high_accuracy", or "stream" under RuntimeProfile::STREAM.
Always a static string literal, so it stays valid for the process, but the pointer changes when the detector changes. parse_detection_algorithm() turns it back into a DetectionAlgorithm. Note these are the protocol names, not BaseDetector::get_name(), which is capitalized for logs.
Definition at line 129 of file runtime_snapshot.h.
| RuntimeSubcarrierSource espectre::RuntimeSnapshot::subcarrier_source {RuntimeSubcarrierSource::FIXED_DEFAULT} |
How fixed_subcarriers was chosen.
Definition at line 131 of file runtime_snapshot.h.
| SelectedSubcarriers espectre::RuntimeSnapshot::fixed_subcarriers {make_default_subcarriers()} |
Subcarrier indices the detector is measuring on.
Definition at line 133 of file runtime_snapshot.h.