|
ESPectre SDK 2.8.0-290-gdfdd0bc
Wi-Fi CSI motion sensing for ESP32 firmware
|
Everything the runtime needs to know before setup(). More...
#include <runtime_interface.h>
Public Attributes | |
| RuntimeProfile | runtime_profile {RuntimeProfile::SENSING} |
| Which backend to build: motion sensing, or raw CSI streaming to a collector. | |
| WifiBandPolicy | wifi_band_policy {WifiBandPolicy::BAND_2G} |
| Band available to the station while the runtime keeps the PHY at HT20. | |
| DetectionAlgorithm | detection_algorithm {DetectionAlgorithm::LIGHTWEIGHT} |
| Detection profile to run. | |
| float | segmentation_threshold {RUNTIME_SEGMENTATION_THRESHOLD_DEFAULT} |
| Motion probability threshold, on the same 0..1 scale as RuntimeSnapshot::movement_metric. | |
| uint32_t | segmentation_window_size_ms {RUNTIME_SEGMENTATION_WINDOW_SIZE_MS_DEFAULT} |
| Detector window duration in milliseconds (1000..2000). | |
| bool | runtime_detector_selection_enabled {false} |
| Advertise runtime detector switching. | |
| uint32_t | csi_target_pps {RUNTIME_CSI_TARGET_PPS_DEFAULT} |
| Target CSI sensing cadence, in packets per second. | |
| RuntimeTrafficMode | traffic_generator_mode {RuntimeTrafficMode::PING} |
| Which packet the internal generator sends to solicit CSI. | |
| CsiTrafficMode | csi_traffic_mode {CsiTrafficMode::INTERNAL} |
| Where the CSI-bearing traffic comes from. | |
| uint16_t | csi_traffic_udp_port {RUNTIME_CSI_TRAFFIC_UDP_PORT_DEFAULT} |
| UDP port used by the external and pacing CSI traffic modes. | |
| std::string | csi_traffic_multicast_group {RUNTIME_CSI_TRAFFIC_MULTICAST_GROUP_DEFAULT} |
| IPv4 multicast group joined by the UDP listener in external and pacing. | |
| std::string | csi_traffic_expected_payload |
| Payload marker that identifies accepted external CSI traffic (0..16 bytes). | |
| uint64_t | device_id {0U} |
| Stable device identity used by the ESPectre Protocol and CSI streaming. | |
| uint16_t | collector_port {RUNTIME_STREAM_COLLECTOR_PORT_DEFAULT} |
| RuntimeProfile::STREAM only: UDP port of the host CSI collector (1..65535). | |
| uint32_t | stream_log_interval_ms {RUNTIME_STREAM_LOG_INTERVAL_MS_DEFAULT} |
| RuntimeProfile::STREAM only: interval between stream status logs, in ms (100..60000). | |
| uint8_t | stream_tx_batch_records {RUNTIME_STREAM_TX_BATCH_RECORDS_DEFAULT} |
| RuntimeProfile::STREAM only: CSI records coalesced into one datagram (1..7). | |
| uint32_t | publish_interval_ms {RUNTIME_PUBLISH_INTERVAL_MS_DEFAULT} |
| Milliseconds between IRuntimeListener::on_periodic_update() callbacks. | |
| uint32_t | evaluation_interval_ms {RUNTIME_EVALUATION_INTERVAL_MS_DEFAULT} |
| Detector evaluation cadence in milliseconds. | |
| uint8_t | motion_on_hits {RUNTIME_MOTION_ON_HITS_DEFAULT} |
| Consecutive above-threshold evaluations before reporting motion (1..20). | |
| uint8_t | motion_off_hits {RUNTIME_MOTION_OFF_HITS_DEFAULT} |
| Consecutive below-threshold evaluations before clearing motion (1..20). | |
| bool | lowpass_enabled {RUNTIME_LOWPASS_ENABLED_DEFAULT} |
| Enable the low-pass filter on the turbulence stream. | |
| float | lowpass_cutoff {RUNTIME_LOWPASS_CUTOFF_DEFAULT} |
| Low-pass cutoff in Hz (5.0..20.0). | |
| bool | hampel_enabled {RUNTIME_HAMPEL_ENABLED_DEFAULT} |
| Enable Hampel outlier rejection on the turbulence stream. | |
| uint8_t | hampel_window {RUNTIME_HAMPEL_WINDOW_DEFAULT} |
| Hampel window in samples (3..11). | |
| float | hampel_threshold {RUNTIME_HAMPEL_THRESHOLD_DEFAULT} |
| Hampel MAD multiplier (1.0..10.0). | |
Everything the runtime needs to know before setup().
Every member is default-constructed to a supported production value, so RuntimeConfig{} is a working configuration for Lightweight Detection on internally generated traffic. Override only what your product changes.
Ranges are declared in runtime_sensing_schema.h as RUNTIME_<FIELD>_MIN / _MAX / _DEFAULT, and the free functions in runtime_config_utils.h validate against them. On ESP-IDF you can build this from menuconfig with make_runtime_sensing_config_from_kconfig() instead of assigning fields by hand.
The config is copied into the runtime at setup(). Later edits to your own copy have no effect; use the set_*_runtime() control methods instead.
Definition at line 60 of file runtime_interface.h.
| RuntimeProfile espectre::RuntimeConfig::runtime_profile {RuntimeProfile::SENSING} |
Which backend to build: motion sensing, or raw CSI streaming to a collector.
Definition at line 62 of file runtime_interface.h.
| WifiBandPolicy espectre::RuntimeConfig::wifi_band_policy {WifiBandPolicy::BAND_2G} |
Band available to the station while the runtime keeps the PHY at HT20.
BAND_5G and AUTO require dual-band silicon. Keeping BAND_2G as the default preserves the band covered by the production detector corpus.
Definition at line 69 of file runtime_interface.h.
| DetectionAlgorithm espectre::RuntimeConfig::detection_algorithm {DetectionAlgorithm::LIGHTWEIGHT} |
Detection profile to run.
Lightweight self-calibrates; High Accuracy uses trained weights.
Definition at line 71 of file runtime_interface.h.
| float espectre::RuntimeConfig::segmentation_threshold {RUNTIME_SEGMENTATION_THRESHOLD_DEFAULT} |
Motion probability threshold, on the same 0..1 scale as RuntimeSnapshot::movement_metric.
Lightweight Detection overwrites this during startup calibration, so the configured value only governs the pre-calibration window. High-Accuracy Detection keeps it as given.
Definition at line 79 of file runtime_interface.h.
| uint32_t espectre::RuntimeConfig::segmentation_window_size_ms {RUNTIME_SEGMENTATION_WINDOW_SIZE_MS_DEFAULT} |
Detector window duration in milliseconds (1000..2000).
Runtimes resolve the duration to a fixed temporal grid from csi_target_pps; live arrival jitter never resizes the detector.
Definition at line 86 of file runtime_interface.h.
| bool espectre::RuntimeConfig::runtime_detector_selection_enabled {false} |
Advertise runtime detector switching.
When true the runtime restores the persisted detector choice at setup() and sets RuntimeCapabilities::supports_runtime_detector_selection.
Definition at line 93 of file runtime_interface.h.
| uint32_t espectre::RuntimeConfig::csi_target_pps {RUNTIME_CSI_TARGET_PPS_DEFAULT} |
Target CSI sensing cadence, in packets per second.
This value is always positive and defines detector temporal slots as well as the target for managed traffic. csi_traffic_mode alone selects who supplies traffic. The detector coefficients are fitted at 100 pps; see docs/ALGORITHMS.md before moving far from it.
Definition at line 102 of file runtime_interface.h.
| RuntimeTrafficMode espectre::RuntimeConfig::traffic_generator_mode {RuntimeTrafficMode::PING} |
Which packet the internal generator sends to solicit CSI.
Definition at line 104 of file runtime_interface.h.
| CsiTrafficMode espectre::RuntimeConfig::csi_traffic_mode {CsiTrafficMode::INTERNAL} |
Where the CSI-bearing traffic comes from.
See csi_traffic_types.h.
Definition at line 106 of file runtime_interface.h.
| uint16_t espectre::RuntimeConfig::csi_traffic_udp_port {RUNTIME_CSI_TRAFFIC_UDP_PORT_DEFAULT} |
UDP port used by the external and pacing CSI traffic modes.
Definition at line 108 of file runtime_interface.h.
| std::string espectre::RuntimeConfig::csi_traffic_multicast_group {RUNTIME_CSI_TRAFFIC_MULTICAST_GROUP_DEFAULT} |
IPv4 multicast group joined by the UDP listener in external and pacing.
Empty disables the IGMP join. Unicast to the device IP still works.
Definition at line 114 of file runtime_interface.h.
| std::string espectre::RuntimeConfig::csi_traffic_expected_payload |
Payload marker that identifies accepted external CSI traffic (0..16 bytes).
Definition at line 116 of file runtime_interface.h.
| uint64_t espectre::RuntimeConfig::device_id {0U} |
Stable device identity used by the ESPectre Protocol and CSI streaming.
Leave at zero to derive it from the Wi-Fi MAC via derive_runtime_device_id().
Definition at line 123 of file runtime_interface.h.
| uint16_t espectre::RuntimeConfig::collector_port {RUNTIME_STREAM_COLLECTOR_PORT_DEFAULT} |
RuntimeProfile::STREAM only: UDP port of the host CSI collector (1..65535).
Definition at line 125 of file runtime_interface.h.
| uint32_t espectre::RuntimeConfig::stream_log_interval_ms {RUNTIME_STREAM_LOG_INTERVAL_MS_DEFAULT} |
RuntimeProfile::STREAM only: interval between stream status logs, in ms (100..60000).
Definition at line 127 of file runtime_interface.h.
| uint8_t espectre::RuntimeConfig::stream_tx_batch_records {RUNTIME_STREAM_TX_BATCH_RECORDS_DEFAULT} |
RuntimeProfile::STREAM only: CSI records coalesced into one datagram (1..7).
Definition at line 129 of file runtime_interface.h.
| uint32_t espectre::RuntimeConfig::publish_interval_ms {RUNTIME_PUBLISH_INTERVAL_MS_DEFAULT} |
Milliseconds between IRuntimeListener::on_periodic_update() callbacks.
Definition at line 131 of file runtime_interface.h.
| uint32_t espectre::RuntimeConfig::evaluation_interval_ms {RUNTIME_EVALUATION_INTERVAL_MS_DEFAULT} |
Detector evaluation cadence in milliseconds.
Definition at line 133 of file runtime_interface.h.
| uint8_t espectre::RuntimeConfig::motion_on_hits {RUNTIME_MOTION_ON_HITS_DEFAULT} |
Consecutive above-threshold evaluations before reporting motion (1..20).
Definition at line 135 of file runtime_interface.h.
| uint8_t espectre::RuntimeConfig::motion_off_hits {RUNTIME_MOTION_OFF_HITS_DEFAULT} |
Consecutive below-threshold evaluations before clearing motion (1..20).
Definition at line 137 of file runtime_interface.h.
| bool espectre::RuntimeConfig::lowpass_enabled {RUNTIME_LOWPASS_ENABLED_DEFAULT} |
Enable the low-pass filter on the turbulence stream.
Off by default.
Definition at line 139 of file runtime_interface.h.
| float espectre::RuntimeConfig::lowpass_cutoff {RUNTIME_LOWPASS_CUTOFF_DEFAULT} |
Low-pass cutoff in Hz (5.0..20.0).
Ignored unless lowpass_enabled.
Definition at line 141 of file runtime_interface.h.
| bool espectre::RuntimeConfig::hampel_enabled {RUNTIME_HAMPEL_ENABLED_DEFAULT} |
Enable Hampel outlier rejection on the turbulence stream.
On by default.
Definition at line 143 of file runtime_interface.h.
| uint8_t espectre::RuntimeConfig::hampel_window {RUNTIME_HAMPEL_WINDOW_DEFAULT} |
Hampel window in samples (3..11).
Ignored unless hampel_enabled.
Definition at line 145 of file runtime_interface.h.
| float espectre::RuntimeConfig::hampel_threshold {RUNTIME_HAMPEL_THRESHOLD_DEFAULT} |
Hampel MAD multiplier (1.0..10.0).
Ignored unless hampel_enabled.
Definition at line 147 of file runtime_interface.h.