3#include "../../proto/transcoder.h"
4#include "../communication.h"
17 UserConfigCommand_RequestType_REQUEST_CONFIG, NULL, tx->
data, tx->
size);
37 if (cmd.which_command != Esp32Command_user_config_command_tag) {
42 if (cmd.command.user_config_command.type ==
43 UserConfigCommand_RequestType_RESPONSE_CONFIG) {
44 if (cmd.command.user_config_command.has_config_data) {
45 const UserConfiguration* config =
46 &cmd.command.user_config_command.config_data;
91 UserConfigCommand response = {0};
92 response.type = UserConfigCommand_RequestType_RESPONSE_CONFIG;
93 response.has_config_data =
true;
94 memcpy(&response.config_data, config,
sizeof(UserConfiguration));
124 UserConfigCommand cmd = UserConfigCommand_init_zero;
125 cmd.type = UserConfigCommand_RequestType_START;
146 return (config->logger_id == 0 && config->cell_id == 0);
Buffer * ControllerTx(void)
Get reference to transmit buffer.
Buffer * ControllerRx(void)
Get reference to receive buffer.
ControllerStatus ControllerTransaction(void)
Send message and receive response from esp32.
Esp32Command DecodeEsp32Command(const uint8_t *data, const size_t len)
Decodes an Esp32Command message.
size_t EncodeUserConfigCommand(UserConfigCommand_RequestType type, const UserConfiguration *config_data, uint8_t *buffer, size_t size)
Encodes a UserConfigCommand into a protobuf message.
UserConfigStatus UserConfigSave(const UserConfiguration *config)
Saves the configuration to FRAM.
const UserConfiguration * UserConfigGet(void)
Gets a reference to the loaded user configuration data in RAM.
@ USERCONFIG_ENCODE_ERROR
@ USERCONFIG_EMPTY_CONFIG
@ USERCONFIG_INVALID_RESPONSE
UserConfigStatus ControllerUserConfigSend(void)
Send user configuration to ESP32.
bool ControllerUserConfigStart(void)
Start the user configuration website.
bool isConfigEmpty(const UserConfiguration *config)
Check if configuration is empty/uninitialized.
UserConfigStatus ControllerUserConfigRequest(void)
Request user configuration from ESP32.
User configuration WiFi interface.