ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
runtime_sensing_schema.h File Reference

The schema behind RuntimeConfig: enums, defaults, and valid ranges. More...

#include <cstddef>
#include <cstdint>
#include "detector_limits.h"
#include "detector_types.h"
#include "csi_traffic_types.h"
#include "filter_config.h"

Go to the source code of this file.

Namespaces

namespace  espectre

Enumerations

enum class  espectre::DetectionAlgorithm { espectre::LIGHTWEIGHT , espectre::HIGH_ACCURACY }
 Which detector runs. More...
enum class  espectre::RuntimeProfile { espectre::SENSING , espectre::STREAM }
 Which runtime backend the controller builds. More...
enum class  espectre::RuntimeTrafficMode { espectre::DNS , espectre::PING }
 Which packet the internal generator sends to solicit CSI from the AP. More...

Functions

constexpr float espectre::runtime_threshold_max (DetectionAlgorithm algorithm)
constexpr bool espectre::runtime_detection_algorithm_valid (DetectionAlgorithm algorithm)
constexpr bool espectre::runtime_profile_valid (RuntimeProfile profile)
constexpr bool espectre::runtime_traffic_mode_valid (RuntimeTrafficMode mode)
constexpr bool espectre::runtime_csi_traffic_mode_valid (CsiTrafficMode mode)
constexpr bool espectre::runtime_csi_traffic_mode_valid_for_profile (RuntimeProfile profile, CsiTrafficMode mode)
constexpr float espectre::runtime_default_threshold (DetectionAlgorithm algorithm)

Variables

constexpr const char *const espectre::RUNTIME_TRAFFIC_GENERATOR_MODE_DNS_NAME = "dns"
constexpr const char *const espectre::RUNTIME_TRAFFIC_GENERATOR_MODE_PING_NAME = "ping"
constexpr const char *const espectre::RUNTIME_TRAFFIC_GENERATOR_MODE_DEFAULT_NAME = "ping"
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MODE_INTERNAL_NAME = "internal"
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MODE_EXTERNAL_NAME = "external"
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MODE_PACING_NAME = "pacing"
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MODE_DISABLED_NAME = "disabled"
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MODE_DEFAULT_NAME = "internal"
constexpr const char *const espectre::RUNTIME_DETECTION_ALGORITHM_LIGHTWEIGHT_NAME = "lightweight"
constexpr const char *const espectre::RUNTIME_DETECTION_ALGORITHM_HIGH_ACCURACY_NAME = "high_accuracy"
constexpr const char *const espectre::RUNTIME_DETECTION_ALGORITHM_DEFAULT_NAME = "lightweight"
constexpr float espectre::RUNTIME_THRESHOLD_MIN = 0.0f
constexpr float espectre::RUNTIME_THRESHOLD_MAX = 1.0f
constexpr float espectre::RUNTIME_HIGH_ACCURACY_THRESHOLD_MAX = 1.0f
constexpr float espectre::RUNTIME_SEGMENTATION_THRESHOLD_DEFAULT = LIGHTWEIGHT_DEFAULT_THRESHOLD
constexpr uint32_t espectre::RUNTIME_SEGMENTATION_WINDOW_SIZE_MS_MIN = 1000U
constexpr uint32_t espectre::RUNTIME_SEGMENTATION_WINDOW_SIZE_MS_MAX = 2000U
constexpr uint32_t espectre::RUNTIME_SEGMENTATION_WINDOW_SIZE_MS_DEFAULT = 1000U
constexpr uint32_t espectre::RUNTIME_CSI_TARGET_PPS_MIN = 1U
constexpr uint32_t espectre::RUNTIME_CSI_TARGET_PPS_MAX = 500U
constexpr uint32_t espectre::RUNTIME_CSI_TARGET_PPS_DEFAULT = 100U
constexpr uint32_t espectre::RUNTIME_PUBLISH_INTERVAL_MS_MIN = 100
constexpr uint32_t espectre::RUNTIME_PUBLISH_INTERVAL_MS_MAX = 60000
constexpr uint32_t espectre::RUNTIME_PUBLISH_INTERVAL_MS_DEFAULT = 1000
constexpr uint32_t espectre::RUNTIME_EVALUATION_INTERVAL_MS_MIN = 10
constexpr uint32_t espectre::RUNTIME_EVALUATION_INTERVAL_MS_MAX = 10000
constexpr uint32_t espectre::RUNTIME_EVALUATION_INTERVAL_MS_DEFAULT = 250
constexpr uint8_t espectre::RUNTIME_MOTION_HITS_MIN = 1
constexpr uint8_t espectre::RUNTIME_MOTION_HITS_MAX = 20
constexpr uint8_t espectre::RUNTIME_MOTION_ON_HITS_DEFAULT = 4
constexpr uint8_t espectre::RUNTIME_MOTION_OFF_HITS_DEFAULT = 3
constexpr bool espectre::RUNTIME_LOWPASS_ENABLED_DEFAULT = false
constexpr float espectre::RUNTIME_LOWPASS_CUTOFF_MIN = 5.0f
constexpr float espectre::RUNTIME_LOWPASS_CUTOFF_MAX = 20.0f
constexpr float espectre::RUNTIME_LOWPASS_CUTOFF_DEFAULT = 11.0f
constexpr bool espectre::RUNTIME_HAMPEL_ENABLED_DEFAULT = true
constexpr uint8_t espectre::RUNTIME_HAMPEL_WINDOW_MIN = 3
constexpr uint8_t espectre::RUNTIME_HAMPEL_WINDOW_MAX = 11
constexpr uint8_t espectre::RUNTIME_HAMPEL_WINDOW_DEFAULT = 7
constexpr float espectre::RUNTIME_HAMPEL_THRESHOLD_MIN = 1.0f
constexpr float espectre::RUNTIME_HAMPEL_THRESHOLD_MAX = 10.0f
constexpr float espectre::RUNTIME_HAMPEL_THRESHOLD_DEFAULT = 5.0f
constexpr uint16_t espectre::RUNTIME_STREAM_COLLECTOR_PORT_DEFAULT = 5001
constexpr uint16_t espectre::RUNTIME_NETWORK_PORT_MIN = 1U
constexpr uint16_t espectre::RUNTIME_NETWORK_PORT_MAX = UINT16_MAX
constexpr uint32_t espectre::RUNTIME_STREAM_LOG_INTERVAL_MS_MIN = 100U
constexpr uint32_t espectre::RUNTIME_STREAM_LOG_INTERVAL_MS_MAX = 60000U
constexpr uint32_t espectre::RUNTIME_STREAM_LOG_INTERVAL_MS_DEFAULT = 1000
constexpr uint8_t espectre::RUNTIME_STREAM_TX_BATCH_RECORDS_MIN = 1U
constexpr uint8_t espectre::RUNTIME_STREAM_TX_BATCH_RECORDS_MAX = 7U
constexpr uint8_t espectre::RUNTIME_STREAM_TX_BATCH_RECORDS_DEFAULT = 4
constexpr uint16_t espectre::RUNTIME_CSI_TRAFFIC_UDP_PORT_DEFAULT = 5555
constexpr const char *const espectre::RUNTIME_CSI_TRAFFIC_MULTICAST_GROUP_DEFAULT = "239.255.0.1"
constexpr size_t espectre::RUNTIME_CSI_TRAFFIC_EXPECTED_PAYLOAD_MAX = 16U

Detailed Description

The schema behind RuntimeConfig: enums, defaults, and valid ranges.

This is the single source of truth for what a sensing configuration may contain. Every tunable is declared as a RUNTIME_<FIELD>_DEFAULT plus, where a range applies, _MIN and _MAX. Read them instead of hardcoding limits, so a UI, a provisioning flow, or a config parser stays correct across SDK releases.

The static_assert block at the end holds these values in lockstep with the detector and filter constants they mirror, so a drift between the runtime schema and core/ fails the build rather than the device.

Definition in file runtime_sensing_schema.h.