REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
nvmconfig::PermanentUserDefinedStuff Struct Reference

Permanent untyped arbitrary information which a device user wants to store. More...

#include <user.h>

Inheritance diagram for nvmconfig::PermanentUserDefinedStuff:
Collaboration diagram for nvmconfig::PermanentUserDefinedStuff:

Public Member Functions

std::string name () const
 
void reset_defaults ()
 
void clear ()
 Clear local memory in order to save RAM if an object is not needed during runtime but only at startup.
 
void fromJson (JsonObjectConst src, Context c=Context::Flash) override
 
void toJson (JsonObject target, Context c=Context::Flash) const override
 
- Public Member Functions inherited from nvmconfig::PersistentSettings

Public Attributes

int max_doc_bytes = 600
 
DynamicJsonDocument * doc
 

Additional Inherited Members

- Static Public Member Functions inherited from utils::HeapSingleton< PermanentUserDefinedStuff >
static PermanentUserDefinedStuff & get ()
 

Detailed Description

Permanent untyped arbitrary information which a device user wants to store.

This can be, for instance, additional information in an enterprise network (such as device location or contact name), but also index informaiton for location the lucidac in a larger array of similiar devices.

This class is actually just a thin layer over

See also
PersistentSettings.

Please don't store too much information,

See also
nvmconfig::PersistentSettingsWriter for maximum storage sizes (around 4kB).

Definition at line 26 of file user.h.

Member Function Documentation

◆ clear()

void nvmconfig::PermanentUserDefinedStuff::clear ( )
inlinevirtual

Clear local memory in order to save RAM if an object is not needed during runtime but only at startup.

Reimplemented from nvmconfig::PersistentSettings.

Definition at line 32 of file user.h.

References doc.

◆ fromJson()

void nvmconfig::PermanentUserDefinedStuff::fromJson ( JsonObjectConst src,
Context c = Context::Flash )
inlineoverridevirtual

Implements nvmconfig::PersistentSettings.

Definition at line 33 of file user.h.

References doc, max_doc_bytes, and src.

◆ name()

std::string nvmconfig::PermanentUserDefinedStuff::name ( ) const
inlinevirtual

Implements nvmconfig::PersistentSettings.

Definition at line 30 of file user.h.

◆ reset_defaults()

void nvmconfig::PermanentUserDefinedStuff::reset_defaults ( )
inlinevirtual

Implements nvmconfig::PersistentSettings.

Definition at line 31 of file user.h.

References doc.

◆ toJson()

void nvmconfig::PermanentUserDefinedStuff::toJson ( JsonObject target,
Context c = Context::Flash ) const
inlineoverridevirtual

Implements nvmconfig::PersistentSettings.

Definition at line 38 of file user.h.

References doc.

Member Data Documentation

◆ doc

DynamicJsonDocument* nvmconfig::PermanentUserDefinedStuff::doc

Definition at line 28 of file user.h.

Referenced by clear(), fromJson(), reset_defaults(), and toJson().

◆ max_doc_bytes

int nvmconfig::PermanentUserDefinedStuff::max_doc_bytes = 600

Definition at line 27 of file user.h.

Referenced by fromJson().


The documentation for this struct was generated from the following file:
  • lib/controller/src/nvmconfig/user.h