#include <storage.h>
Public Member Functions | |
Storage (std::shared_ptr< Logging >) | |
Construct a new Storage object, initializes logger and calls Storage() More... | |
~Storage () | |
Destroy the Storage object, closes Flash. More... | |
bool | SaveDeviceCred (const CONFIG_SET::DEVICE_CRED *device_cred) |
Saves the wifi creds and device id to Flash, fetching the data from the variable whose pointer is provided as an argument. More... | |
bool | PopulateDeviceCred (CONFIG_SET::DEVICE_CRED *device_cred) |
Retrieves the wifi creds and device id from the flash and populates them in variable whose pointer is provided as an argument. More... | |
bool | SaveCalibParam (const CONFIG_SET::CALIB_PARAMS *calib_param) |
Saves the calib params to Flash, fetching the data from the variable whose pointer is provided as an argument. More... | |
bool | PopulateCalibParam (CONFIG_SET::CALIB_PARAMS *calib_param) |
Retrieves the calib params from the flash and populates them in variable whose pointer is provided as an argument. More... | |
bool | SaveOperationMode (const CONFIG_SET::OPERATION_MODE *mode) |
Saves the operation mode to Flash, fetching the data from the variable whose pointer is provided as an argument. More... | |
bool | PopulateOperationMode (CONFIG_SET::OPERATION_MODE *mode) |
Retrieves the operation mode from the flash and populates them in variable whose pointer is provided as an argument. More... | |
void | Clear () |
Clears the memory for CONFIG_SET::STORAGE_NAMESPACE workspace. More... | |
Private Attributes | |
Preferences | preferences_ |
std::shared_ptr< Logging > | logger_ |
Storage::Storage | ( | std::shared_ptr< Logging > | logging | ) |
Storage::~Storage | ( | ) |
Destroy the Storage object, closes Flash.
void Storage::Clear | ( | ) |
Clears the memory for CONFIG_SET::STORAGE_NAMESPACE workspace.
bool Storage::PopulateCalibParam | ( | CONFIG_SET::CALIB_PARAMS * | calib_param | ) |
Retrieves the calib params from the flash and populates them in variable whose pointer is provided as an argument.
bool Storage::PopulateDeviceCred | ( | CONFIG_SET::DEVICE_CRED * | device_cred | ) |
Retrieves the wifi creds and device id from the flash and populates them in variable whose pointer is provided as an argument.
bool Storage::PopulateOperationMode | ( | CONFIG_SET::OPERATION_MODE * | mode | ) |
Retrieves the operation mode from the flash and populates them in variable whose pointer is provided as an argument.
bool Storage::SaveCalibParam | ( | const CONFIG_SET::CALIB_PARAMS * | calib_param | ) |
Saves the calib params to Flash, fetching the data from the variable whose pointer is provided as an argument.
bool Storage::SaveDeviceCred | ( | const CONFIG_SET::DEVICE_CRED * | device_cred | ) |
Saves the wifi creds and device id to Flash, fetching the data from the variable whose pointer is provided as an argument.
bool Storage::SaveOperationMode | ( | const CONFIG_SET::OPERATION_MODE * | mode | ) |
Saves the operation mode to Flash, fetching the data from the variable whose pointer is provided as an argument.
|
private |
|
private |