ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
espectre::EspectreCommand Struct Reference

A parsed control command. More...

#include <espectre_protocol.h>

Public Attributes

std::string command_id
 Correlation id echoed in the result payload.
std::string command
 Command verb, for example "set_threshold" or "recalibrate".
std::string device_label
 User-facing label requested by set_device_label; empty clears it.
bool has_device_label {false}
 Whether the command carried a valid string-valued device_label.
float threshold {0.0f}
bool has_threshold {false}
uint8_t motion_on_hits {0U}
uint8_t motion_off_hits {0U}
bool has_motion_hits {false}
std::string csi_traffic_mode
bool has_csi_traffic_mode {false}
std::string traffic_generator_mode
bool has_traffic_generator_mode {false}
std::string detector
bool has_detector {false}
std::string wifi_ssid
std::string wifi_password
std::string wifi_bssid
std::string wifi_band_policy
uint8_t wifi_channel {0U}
bool has_wifi_ssid {false}
bool has_wifi_password {false}
bool has_wifi_bssid {false}
bool has_wifi_band_policy {false}
bool has_wifi_channel {false}
std::string mqtt_host
std::string mqtt_username
std::string mqtt_password
std::string mqtt_topic_prefix
uint16_t mqtt_port {0U}
bool has_mqtt_host {false}
bool has_mqtt_username {false}
bool has_mqtt_password {false}
bool has_mqtt_topic_prefix {false}
bool has_mqtt_port {false}
std::string ota_channel
 OTA release channel for ota_check and ota_start: "release", "preview", or "develop".
bool has_ota_channel {false}

Detailed Description

A parsed control command.

Fields are optional by design: each has_* flag says whether the peer actually sent that field, so an unset value is never confused with a zero the caller meant. Apply only the flagged fields.

Definition at line 160 of file espectre_protocol.h.

Member Data Documentation

◆ command_id

std::string espectre::EspectreCommand::command_id

Correlation id echoed in the result payload.

May be empty.

Definition at line 162 of file espectre_protocol.h.

◆ command

std::string espectre::EspectreCommand::command

Command verb, for example "set_threshold" or "recalibrate".

Definition at line 164 of file espectre_protocol.h.

◆ device_label

std::string espectre::EspectreCommand::device_label

User-facing label requested by set_device_label; empty clears it.

Definition at line 166 of file espectre_protocol.h.

◆ has_device_label

bool espectre::EspectreCommand::has_device_label {false}

Whether the command carried a valid string-valued device_label.

Definition at line 168 of file espectre_protocol.h.

◆ threshold

float espectre::EspectreCommand::threshold {0.0f}

Definition at line 169 of file espectre_protocol.h.

◆ has_threshold

bool espectre::EspectreCommand::has_threshold {false}

Definition at line 170 of file espectre_protocol.h.

◆ motion_on_hits

uint8_t espectre::EspectreCommand::motion_on_hits {0U}

Definition at line 171 of file espectre_protocol.h.

◆ motion_off_hits

uint8_t espectre::EspectreCommand::motion_off_hits {0U}

Definition at line 172 of file espectre_protocol.h.

◆ has_motion_hits

bool espectre::EspectreCommand::has_motion_hits {false}

Definition at line 173 of file espectre_protocol.h.

◆ csi_traffic_mode

std::string espectre::EspectreCommand::csi_traffic_mode

Definition at line 174 of file espectre_protocol.h.

◆ has_csi_traffic_mode

bool espectre::EspectreCommand::has_csi_traffic_mode {false}

Definition at line 175 of file espectre_protocol.h.

◆ traffic_generator_mode

std::string espectre::EspectreCommand::traffic_generator_mode

Definition at line 176 of file espectre_protocol.h.

◆ has_traffic_generator_mode

bool espectre::EspectreCommand::has_traffic_generator_mode {false}

Definition at line 177 of file espectre_protocol.h.

◆ detector

std::string espectre::EspectreCommand::detector

Definition at line 178 of file espectre_protocol.h.

◆ has_detector

bool espectre::EspectreCommand::has_detector {false}

Definition at line 179 of file espectre_protocol.h.

◆ wifi_ssid

std::string espectre::EspectreCommand::wifi_ssid

Definition at line 180 of file espectre_protocol.h.

◆ wifi_password

std::string espectre::EspectreCommand::wifi_password

Definition at line 181 of file espectre_protocol.h.

◆ wifi_bssid

std::string espectre::EspectreCommand::wifi_bssid

Definition at line 182 of file espectre_protocol.h.

◆ wifi_band_policy

std::string espectre::EspectreCommand::wifi_band_policy

Definition at line 183 of file espectre_protocol.h.

◆ wifi_channel

uint8_t espectre::EspectreCommand::wifi_channel {0U}

Definition at line 184 of file espectre_protocol.h.

◆ has_wifi_ssid

bool espectre::EspectreCommand::has_wifi_ssid {false}

Definition at line 185 of file espectre_protocol.h.

◆ has_wifi_password

bool espectre::EspectreCommand::has_wifi_password {false}

Definition at line 186 of file espectre_protocol.h.

◆ has_wifi_bssid

bool espectre::EspectreCommand::has_wifi_bssid {false}

Definition at line 187 of file espectre_protocol.h.

◆ has_wifi_band_policy

bool espectre::EspectreCommand::has_wifi_band_policy {false}

Definition at line 188 of file espectre_protocol.h.

◆ has_wifi_channel

bool espectre::EspectreCommand::has_wifi_channel {false}

Definition at line 189 of file espectre_protocol.h.

◆ mqtt_host

std::string espectre::EspectreCommand::mqtt_host

Definition at line 190 of file espectre_protocol.h.

◆ mqtt_username

std::string espectre::EspectreCommand::mqtt_username

Definition at line 191 of file espectre_protocol.h.

◆ mqtt_password

std::string espectre::EspectreCommand::mqtt_password

Definition at line 192 of file espectre_protocol.h.

◆ mqtt_topic_prefix

std::string espectre::EspectreCommand::mqtt_topic_prefix

Definition at line 193 of file espectre_protocol.h.

◆ mqtt_port

uint16_t espectre::EspectreCommand::mqtt_port {0U}

Definition at line 194 of file espectre_protocol.h.

◆ has_mqtt_host

bool espectre::EspectreCommand::has_mqtt_host {false}

Definition at line 195 of file espectre_protocol.h.

◆ has_mqtt_username

bool espectre::EspectreCommand::has_mqtt_username {false}

Definition at line 196 of file espectre_protocol.h.

◆ has_mqtt_password

bool espectre::EspectreCommand::has_mqtt_password {false}

Definition at line 197 of file espectre_protocol.h.

◆ has_mqtt_topic_prefix

bool espectre::EspectreCommand::has_mqtt_topic_prefix {false}

Definition at line 198 of file espectre_protocol.h.

◆ has_mqtt_port

bool espectre::EspectreCommand::has_mqtt_port {false}

Definition at line 199 of file espectre_protocol.h.

◆ ota_channel

std::string espectre::EspectreCommand::ota_channel

OTA release channel for ota_check and ota_start: "release", "preview", or "develop".

Empty with has_ota_channel false means the firmware default.

Definition at line 204 of file espectre_protocol.h.

◆ has_ota_channel

bool espectre::EspectreCommand::has_ota_channel {false}

Definition at line 205 of file espectre_protocol.h.


The documentation for this struct was generated from the following file: