|
EepromSecureData
CRC-controlled EEPROM memory storage
|
CRC-controlled EEPROM memory storage template class. More...
#include <EepromSecureData.h>
Public Member Functions | |
| EepromSecureData (EepromSecureBackend backend=EepromSecureBackend::Auto, bool crcEnabled=true) | |
| Construct a new Eeprom Secure Data object. | |
| EepromSecureData (const T &data, EepromSecureBackend backend=EepromSecureBackend::Auto, bool crcEnabled=true) | |
| Construct a new Eeprom Secure Data object with initial data. | |
| ~EepromSecureData () | |
| Destroy the Eeprom Secure Data object. | |
| bool | save () |
| Save data to EEPROM memory with CRC. | |
| bool | load (const T &defaultData=T()) |
| Load data from EEPROM memory with CRC check. | |
| void | setCrcEnabled (bool enabled) |
| Enable or disable CRC checks on save/load. | |
| bool | crcEnabled () const |
| Check whether CRC checks are enabled. | |
| EepromSecureBackend | backend () const |
| Get resolved storage backend used by this instance. | |
| uint16_t | size () const |
| Get the size of the object with CRC. | |
| T & | data () |
| Get the data object. | |
| const T & | data () const |
| Get the data object as const. | |
| operator T& () | |
| Overloaded cast operator to T &. | |
| operator const T & () const | |
| Overloaded cast operator to const T &. | |
| T * | operator& () |
| Overloaded cast operator to T *. | |
| const T * | operator& () const |
| Overloaded cast operator to const T. | |
| T & | operator= (const T &t) |
| Overloaded assignment operator from T. | |
| EepromSecureData & | operator= (const EepromSecureData &rhs) |
| Overloaded assignment operator from EepromSecureData. | |
| bool | operator== (const EepromSecureData &rhs) const |
| Overloaded equality operator. | |
| bool | operator!= (const EepromSecureData &rhs) const |
| Overloaded not-equality operator. | |
CRC-controlled EEPROM memory storage template class.
| T | data type |
Definition at line 27 of file EepromSecureData.h.
|
inline |
Construct a new Eeprom Secure Data object.
EEPROM memory is allocated automatically, EepromBase::counter is updated with the size of the object
Definition at line 35 of file EepromSecureData.h.
References EepromSecureData< T >::size().
|
inline |
Construct a new Eeprom Secure Data object with initial data.
| data | initial data |
Definition at line 46 of file EepromSecureData.h.
References EepromSecureData< T >::data().
|
inline |
Destroy the Eeprom Secure Data object.
EEPROM memory is saved automatically
Definition at line 56 of file EepromSecureData.h.
References EepromSecureData< T >::save().
|
inline |
Get resolved storage backend used by this instance.
Definition at line 142 of file EepromSecureData.h.
|
inline |
Check whether CRC checks are enabled.
Definition at line 133 of file EepromSecureData.h.
|
inline |
Get the data object.
Definition at line 156 of file EepromSecureData.h.
Referenced by EepromSecureData< T >::EepromSecureData().
|
inline |
Get the data object as const.
Definition at line 163 of file EepromSecureData.h.
|
inline |
Load data from EEPROM memory with CRC check.
| defaultData | default data if CRC check failed |
Definition at line 86 of file EepromSecureData.h.
References EepromSecureData< T >::save().
|
inline |
Overloaded cast operator to const T &.
Definition at line 181 of file EepromSecureData.h.
|
inline |
Overloaded cast operator to T &.
Definition at line 172 of file EepromSecureData.h.
|
inline |
Overloaded not-equality operator.
Definition at line 230 of file EepromSecureData.h.
|
inline |
Overloaded cast operator to T *.
Definition at line 190 of file EepromSecureData.h.
|
inline |
Overloaded cast operator to const T.
Definition at line 199 of file EepromSecureData.h.
|
inline |
Overloaded assignment operator from EepromSecureData.
Definition at line 215 of file EepromSecureData.h.
|
inline |
Overloaded assignment operator from T.
Definition at line 206 of file EepromSecureData.h.
|
inline |
Overloaded equality operator.
Definition at line 223 of file EepromSecureData.h.
|
inline |
Save data to EEPROM memory with CRC.
Definition at line 65 of file EepromSecureData.h.
Referenced by EepromSecureData< T >::load(), and EepromSecureData< T >::~EepromSecureData().
|
inline |
Enable or disable CRC checks on save/load.
| enabled | true to use CRC, false to bypass CRC validation |
Definition at line 124 of file EepromSecureData.h.
|
inline |
Get the size of the object with CRC.
Definition at line 149 of file EepromSecureData.h.
Referenced by EepromSecureData< T >::EepromSecureData().