ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
runtime_config_utils.h
Go to the documentation of this file.
1/*
2 * ESPectre - Runtime Config Utils
3 *
4 * Helpers for normalizing and applying runtime configuration.
5 *
6 * Author: Francesco Pace <francesco.pace@gmail.com>
7 * SPDX-License-Identifier: GPL-3.0-only
8 * Commercial licensing available under separate agreement; see LICENSING.md.
9 */
10#pragma once
11
12#include "runtime_interface.h"
13
14namespace espectre {
15
16/** Machine-readable reason a `RuntimeConfig` cannot be applied. */
40
41bool validate_runtime_threshold(float threshold);
43bool validate_runtime_float(float value, float min_value, float max_value);
44bool validate_runtime_uint32(uint32_t value, uint32_t min_value, uint32_t max_value);
45bool validate_runtime_uint8(uint8_t value, uint8_t min_value, uint8_t max_value);
46
47/** Validate the complete configuration before creating runtime state. */
49/** Stable diagnostic label for a configuration error. Never returns `nullptr`. */
51
54
61
66
68
69} // namespace espectre
const char * detection_algorithm_name(DetectionAlgorithm algorithm)
const char * traffic_mode_name(RuntimeTrafficMode mode)
WifiBandPolicy parse_wifi_band_policy(const char *policy)
RuntimeConfigError validate_runtime_config(const RuntimeConfig &config)
Validate the complete configuration before creating runtime state.
CsiTrafficMode parse_csi_traffic_mode(const char *mode)
const char * runtime_config_error_message(RuntimeConfigError error)
Stable diagnostic label for a configuration error.
RuntimeProfile
Which runtime backend the controller builds.
RuntimeTrafficMode
Which packet the internal generator sends to solicit CSI from the AP.
DetectionAlgorithm parse_detection_algorithm(const char *algorithm)
bool validate_runtime_uint32(uint32_t value, uint32_t min_value, uint32_t max_value)
bool validate_runtime_threshold_for_algorithm(float threshold, DetectionAlgorithm algorithm)
CsiTrafficMode
Where the CSI-bearing traffic comes from.
bool validate_runtime_float(float value, float min_value, float max_value)
const char * runtime_profile_name(RuntimeProfile profile)
const char * wifi_band_policy_name(WifiBandPolicy policy)
bool validate_runtime_uint8(uint8_t value, uint8_t min_value, uint8_t max_value)
const char * subcarrier_source_name(RuntimeSubcarrierSource source)
RuntimeConfig make_runtime_sensing_config()
bool csi_traffic_mode_is_sensing_control(CsiTrafficMode mode)
WifiBandPolicy
Wi-Fi band selection requested by the embedding frontend.
const char * csi_traffic_mode_name(CsiTrafficMode mode)
bool validate_runtime_threshold(float threshold)
DetectionAlgorithm
Which detector runs.
CsiTrafficMode normalize_sensing_csi_traffic_mode(CsiTrafficMode mode)
RuntimeTrafficMode parse_traffic_mode(const char *mode)
RuntimeConfigError
Machine-readable reason a RuntimeConfig cannot be applied.
RuntimeSubcarrierSource
How the runtime chose the subcarriers it measures on.
Runtime configuration and the backend contract behind it.
Everything the runtime needs to know before setup().