ReduxLib C++ 2024.3.2
|
#include <CanandSettings.h>
Public Member Functions | |
CanandSettings ()=default | |
CanandSettings (CanandSettings &stg) | |
~CanandSettings ()=default | |
std::unordered_map< uint8_t, uint64_t > | FilteredMap () |
bool | AllSettingsReceived () const |
virtual const std::vector< uint8_t > & | SettingAddresses () const |
std::unordered_map< uint8_t, uint64_t > & | GetMap () |
bool | IsEmpty () const |
bool | IsEphemeral () const |
void | SetEphemeral (bool value) |
std::string | ToString () |
Protected Attributes | |
std::unordered_map< uint8_t, uint64_t > | values |
bool | ephemeral = false |
Base (simple) settings class for Redux devices.
Inheriting classes with more complex firmware interfaces may or may not use this structure. It's typically used in conjunction with CanandSettingsManager.
In general, however, it's a pretty useful structure.
|
default |
Default constructor.
|
inline |
Copy constructor – only copies over a filtered copy of values.
stg | reference to another CanandSettings. |
|
default |
Destructor.
|
inline |
Returns whether or not all settings fields have been written into the object.
May return false if the a getSettings call did not succeed in fetching every setting.
|
inline |
Return a direct filtered view of settings values as a new unordered_map, limited to only valid settings.
|
inline |
Gets the backing store.
|
inline |
Returns if this CanandSettings has any set settings or not. Useful when a CanandSettings is returned as a result of setSettings to check if all settings succeeded.
|
inline |
Returns if this CanandSettings is set to be ephemeral.
Ephemeral settings do not persist on device reboot, but do not impose any flash wear.
|
inline |
Sets whether or not the settings will be set as ephemeral – that is, does not persist on device power cycle.
Pre-v2024 firmwares will not support this!
value | true if ephemeral |
|
inlinevirtual |
Gets the array of settings addresses this settings class records.
Reimplemented in redux::sensors::canandgyro::CanandgyroSettings, and redux::sensors::canandmag::CanandmagSettings.
|
inline |
Dump the CanandSettings map as a string.
|
protected |
Whether the settings in this class should be set ephemerally.
|
protected |
The backing store.