|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
#include <Arduino.h>#include <libents/proto/user_config.pb.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | setConfig (const UserConfiguration &new_config) |
| Set the user configuration. | |
| const UserConfiguration & | getConfig () |
| Get a copy of the current user configuration. | |
| String | getConfigJson () |
| Get the current configuration as a JSON string. | |
| void | printReceivedConfig () |
| Print the current user configuration to the log. | |
| void | printConfig (const UserConfiguration &pconfig) |
| Print a user config. | |
| const UserConfiguration & getConfig | ( | ) |
Get a copy of the current user configuration.
This function returns a SHALLOW coyy of the user config. No modification should be made.
Checks are also performed to ensure the configuration can be encoded/decoded.
Definition at line 48 of file configuration.cpp.
Referenced by getConfigJson(), and handleSave().
| String getConfigJson | ( | ) |
Get the current configuration as a JSON string.
This function converts the current user configuration to a JSON string representation.
Definition at line 50 of file configuration.cpp.
References getConfig(), and i.
Referenced by handleConfig().
| void printConfig | ( | const UserConfiguration & | pconfig | ) |
Print a user config.
| pconfig | Config to print |
Definition at line 123 of file configuration.cpp.
References i.
Referenced by printReceivedConfig().
| void printReceivedConfig | ( | ) |
Print the current user configuration to the log.
Definition at line 183 of file configuration.cpp.
References printConfig().
Referenced by handleSave().
| void setConfig | ( | const UserConfiguration & | new_config | ) |
Set the user configuration.
Performs a deep copy of the configuration.
Definition at line 10 of file configuration.cpp.
References buffer, DecodeUserConfiguration(), and EncodeUserConfiguration().
Referenced by handleSave(), and ModuleHandler::ModuleUserConfig::ModuleUserConfig().