ESP-LiveControl
1.99.1
HTTP server, AJAX API backend and Vue.js web application implementing self-contained, zero-install WiFi remote control of hardware modules attached to the Espressif ESP32 SoC
|
Application state containing data and settings model. More...
#include <app_state_model.hpp>
Public Member Functions | |
size_t | serialize_full_state (char *buf, size_t buf_len) |
Serialize application runtime state and configurable settings into buffer as a JSON string. | |
bool | deserialize_settings (const char *buf, size_t buf_len) |
Restore application runtime configurable settings from json string in buffer back into this instance. | |
bool | save_to_file (const char *filename) |
Write application runtime configurable settings to SPIFFs file as a JSON string. | |
bool | restore_from_file (const char *filename) |
Restore application runtime configurable settings from SPIFFs file back into this instance. | |
Public Attributes | |
NetworkConfig | net_conf {} |
AuxHwDrvState * | aux_hw_drv_state = nullptr |
bool | setpoint_throttling_enabled = true |
pspwm_clk_conf_t * | pspwm_clk_conf = nullptr |
pspwm_setpoint_t * | pspwm_setpoint = nullptr |
pspwm_setpoint_limits_t * | pspwm_setpoint_limits = nullptr |
float | frequency_min = constants.frequency_min |
float | frequency_max = constants.frequency_max |
float | frequency_target = 100.0e3f |
float | frequency_increment = 500.0f |
float | duty_min = 0.0f |
float | duty_max = 0.8f |
float | duty_target = 0.0f |
float | duty_increment = 0.05f |
bool | hw_oc_fault_present = true |
bool | hw_oc_fault_occurred = true |
uint32_t | oneshot_power_pulse_length_ms = 1 |
Static Public Attributes | |
static constexpr size_t | _key_strings_size |
static constexpr size_t | _json_objects_size = JSON_OBJECT_SIZE(31) |
static constexpr size_t | I_AM_SCARED_MARGIN = 50 |
static constexpr size_t | json_buf_len |
static constexpr AppConstants | constants {} |
Application state containing data and settings model.
Live data is kept here and and can be serialised to be sent to the connected remote clients.
Runtime user configurable settings can be serialised and stored to file or read back from file and restored into this instance.
|
staticconstexpr |