|
Modbus Vault v1.0
|
Implementation of the system configurations. More...
#include "esp_partition.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "system_config_internal.h"#include "utils.h"#include "wifi_manager.h"#include <string.h>Functions | |
| static void | save_parameters_callback (void *arg_void_ptr) |
| Callback to save parameters to NVS on timer timeout. | |
| esp_err_t | system_config_setup_defaults (void) |
| Setup default configurations. | |
| esp_err_t | system_config_setup (void) |
| Setup system configurations. | |
| mqtt_bridge_config_t * | system_config_get_mqtt_config (void) |
| Get MQTT bridge configuration. | |
| rs485_driver_config_t * | system_config_get_rs485_driver_config (void) |
| Get rs485 driver configuration. | |
| modbus_analyzer_config_t * | system_config_get_modbus_analyzer_config (void) |
| Get Modbus analyzer configuration. | |
| blackbox_logger_config_t * | system_config_get_blackbox_logger_config (void) |
| Get Blackbox logger configuration. | |
| wifi_config_t * | system_config_get_wifi_config (void) |
| Get WiFi configuration. | |
| nvs_manager_ops_t * | system_config_get_nvs_manager_ops (void) |
| Get NVS operations. | |
| void | system_config_reset (void) |
| Reset system config. | |
Variables | |
| static const char * | TAG = "SYSTEM_CONFIG" |
| static uint8_t | sector_buf [BLACKBOX_LOGGER_SECTOR_SIZE] |
| static uint8_t | batch_buf [BLACKBOX_LOGGER_BATCH_SIZE] |
| static char | system_config_mqtt_uri [NVS_MANAGER_MAX_MQTT_URI_SIZE] |
| static char | system_config_mqtt_user [NVS_MANAGER_MAX_MQTT_USER_SIZE] |
| static char | system_config_mqtt_pass [NVS_MANAGER_MAX_MQTT_PASSWORD_SIZE] |
| static esp_timer_handle_t | save_param_timer_handle |
| static system_config_t | global_config |
Implementation of the system configurations.
|
static |
Callback to save parameters to NVS on timer timeout.
| arg_void_ptr | Void pointer to argument |
| blackbox_logger_config_t * system_config_get_blackbox_logger_config | ( | void | ) |
Get Blackbox logger configuration.
| modbus_analyzer_config_t * system_config_get_modbus_analyzer_config | ( | void | ) |
Get Modbus analyzer configuration.
| mqtt_bridge_config_t * system_config_get_mqtt_config | ( | void | ) |
Get MQTT bridge configuration.
| nvs_manager_ops_t * system_config_get_nvs_manager_ops | ( | void | ) |
Get NVS operations.
| rs485_driver_config_t * system_config_get_rs485_driver_config | ( | void | ) |
Get rs485 driver configuration.
| wifi_config_t * system_config_get_wifi_config | ( | void | ) |
Get WiFi configuration.
| esp_err_t system_config_setup | ( | void | ) |
Setup system configurations.
| ESP_OK | Setup success |
| ESP_ERR_INVALID_ARG | Provided invalid argument(s) |
| ESP_ERR_INVALID_STATE | Configuration in invalid state |
| ESP_ERR_NO_MEM | No available memory for resource allocation |
| esp_err_t system_config_setup_defaults | ( | void | ) |
Setup default configurations.
| ESP_OK | Set success |
| ESP_ERR_INVALID_ARG | Provided invalid argument(s) |
Must be called before NVS initialization
|
static |
Expected batch buffer by Blackbox Logger
|
static |
System's configurations structure
|
static |
Timer handle for saving parameters
|
static |
Expected sector buffer by Blackbox Logger
|
static |
Buffer to save MQTT password
|
static |
Buffer to save MQTT URI
|
static |
Buffer to save MQTT user
|
static |
System config TAG name