|
ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
|
The sensing backend behind RuntimeFrontendController. More...
#include <runtime_interface.h>
Public Member Functions | |
| virtual | ~IEspectreRuntime ()=default |
| virtual bool | setup ()=0 |
| Bring the runtime up: radio hooks, CSI capture, detector, traffic. | |
| virtual void | shutdown ()=0 |
| Stop sensing and release everything setup() acquired. | |
| virtual void | loop ()=0 |
| Advance runtime work and drain deferred events. | |
| virtual void | set_services_armed (bool armed)=0 |
| Gate the runtime-owned services without tearing the runtime down. | |
| virtual void | set_live_telemetry_enabled (bool enabled)=0 |
| Enable or suppress the high-rate on_live_telemetry() stream. | |
| virtual bool | set_threshold_runtime (float threshold)=0 |
| Retune the motion threshold while running. | |
| virtual bool | set_motion_hits_runtime (uint8_t motion_on_hits, uint8_t motion_off_hits)=0 |
| Retune the hit filter while running. | |
| virtual bool | set_csi_traffic_mode_runtime (CsiTrafficMode mode) |
| Switch who owns the CSI-bearing traffic while running. | |
| virtual bool | set_traffic_generator_mode_runtime (RuntimeTrafficMode mode) |
| Change the internal traffic generator packet type while running. | |
| virtual bool | set_detection_algorithm_runtime (DetectionAlgorithm algorithm)=0 |
| Switch detector while running, rebuilding detector state. | |
| virtual bool | trigger_recalibration ()=0 |
| Restart startup calibration against the current ambient channel. | |
| virtual bool | is_calibrating () const =0 |
| True while startup calibration is running and detection is not yet valid. | |
| virtual RuntimeSnapshot | get_snapshot () const =0 |
| Current sensing state. | |
| virtual RuntimeDiagnosticsSnapshot | get_diagnostics () const |
| Capture, traffic, and link counters for diagnostic frontends. | |
| virtual RuntimeCapabilities | get_capabilities () const =0 |
| What this backend actually supports. | |
| virtual void | set_listener (IRuntimeListener *listener)=0 |
| Install the event sink, or nullptr to detach. | |
The sensing backend behind RuntimeFrontendController.
Implement this only to replace the shipped ESP-IDF backend. Integrations consume it indirectly: the controller owns the instance, forwards control calls, and gates them on get_capabilities().
Definition at line 163 of file runtime_interface.h.
|
virtualdefault |
|
pure virtual |
Bring the runtime up: radio hooks, CSI capture, detector, traffic.
|
pure virtual |
Stop sensing and release everything setup() acquired.
Safe to repeat.
|
pure virtual |
Advance runtime work and drain deferred events.
Call it continuously from your loop task. This is where listener callbacks are delivered, so a slow callback delays the next iteration.
|
pure virtual |
Gate the runtime-owned services without tearing the runtime down.
Disarmed, the runtime stays configured but starts no CSI capture or traffic. The current Wi-Fi association is preserved so arming again can restart capture without waiting for another IP event. Matter uses this to stay quiet until commissioning completes; Native uses it to pause sensing while a frontend intentionally suspends sensing.
|
pure virtual |
Enable or suppress the high-rate on_live_telemetry() stream.
|
pure virtual |
Retune the motion threshold while running.
|
pure virtual |
Retune the hit filter while running.
|
inlinevirtual |
Switch who owns the CSI-bearing traffic while running.
Defaulted rather than pure so existing out-of-tree backends keep compiling. A backend that does not implement live traffic retuning should return false and let the frontend reject the command.
Definition at line 217 of file runtime_interface.h.
|
inlinevirtual |
Change the internal traffic generator packet type while running.
Backends that do not own traffic retuning keep the default false.
Definition at line 223 of file runtime_interface.h.
|
pure virtual |
Switch detector while running, rebuilding detector state.
|
pure virtual |
Restart startup calibration against the current ambient channel.
|
pure virtual |
True while startup calibration is running and detection is not yet valid.
|
pure virtual |
Current sensing state.
Cheap enough to poll from your loop.
|
inlinevirtual |
Capture, traffic, and link counters for diagnostic frontends.
The counters are cumulative and monotonic within a session. Feed them to RuntimeDiagnosticsSampler from an existing periodic sensing callback to get rates without adding a diagnostic timer.
Defaulted rather than pure so that adding it does not break out-of-tree backends. A runtime that collects nothing keeps the zeroed snapshot, which is what a frontend reads as "no counters from this backend".
Definition at line 253 of file runtime_interface.h.
|
pure virtual |
What this backend actually supports.
Stable after setup().
|
pure virtual |
Install the event sink, or nullptr to detach.
Set it before setup() so calibration events are not missed. The runtime does not take ownership; the listener must outlive the runtime.