84const uint32_t PermitFlashFromStorage = (0x80000000);
89class RootParseStateInfo;
91typedef void(LeafCallBack)(config_leaf *p,
void *pextra);
101 config_leaf(config_leaf &rhs) =
delete;
103 config_leaf *FindChild(
const char *&cp);
104 void RootParse(RootParseStateInfo &rpsi);
105 static void FixTree(config_leaf* root);
108 virtual void RemoveFromRootList();
109 void RawFdPrintTree(
int fd, config_leaf *pl,
int n,
bool pretty, uint32_t mask,
bool braw_values,
bool valonly);
112 inline void FdPrintValTree(
int fd, config_leaf *pl,
int n,
bool pretty, uint32_t inhibit_mask =
fConfigHidden,
bool bRawValue =
false)
114 RawFdPrintTree(fd,pl,n,pretty,inhibit_mask,bRawValue,
true);
116 inline void FdPrintTree(
int fd, config_leaf *pl,
int n,
bool pretty, uint32_t inhibit_mask =
fConfigHidden,
bool bRawValue =
false)
118 RawFdPrintTree(fd,pl,n,pretty,inhibit_mask,bRawValue,
false);
121 void FdPrintSchema(
int fd, config_leaf *pl,
int n,
bool pretty, uint32_t inhibit_mask =
fConfigHidden);
122 void SchemaOptions(
int fd,
int indent,
bool pretty);
123 void ForEachLeaf(LeafCallBack *pc,
void *pextra,
bool siblings =
false);
124 bool FlatParseBuffer(fifo_buffer_storage &rxbuf, uint32_t permissions,
const char *where);
125 bool ParseBuffer(fifo_buffer_storage &rxbuf, uint32_t permissions,
const char *where);
126 bool ParseBlob(uint8_t *pdata,
int len, uint32_t permissions);
127 bool FlatParseBlob(uint8_t *pdata,
int len, uint32_t permissions);
128 bool ParseFd(
int fd, uint32_t permissions, config_leaf * pParseRoot = NULL);
130 static config_leaf *FindConfigLeaf(
const unsigned char *name, config_leaf *pBranch = NULL);
133 void FixNonStaticObject();
135 void RemoveFromConfigTree();
138 const char *pDescription;
139 config_leaf *pNextSibling;
141 config_leaf *pChildren;
143 static config_leaf *pRootList;
144 static config_leaf *pDetachList;
147 void DoSchemaLine(
int fd,
const char *name,
const char *value,
int indent,
bool pretty,
bool quoted =
true);
150 bool NameMatch(
const char *cp);
151 virtual const char *GetSortNameValue() {
return pName; };
152 virtual void GetDescriptionValue(
NBString &s) { s = pDescription; };
153 virtual void GetNameValue(
NBString &s) { s = pName; };
154 virtual void GetTextValue(
NBString &s) { s = pName; };
155 virtual void GetRawValue(
NBString &s) {
return GetTextValue(s); };
156 virtual void GetTypeValue(
NBString &s) { s =
"unknown"; };
157 virtual void ExtendedSchema(
int fd,
int indent,
bool pretty){};
161 virtual int Missing_ConfigEndMarker(
void *&startp) = 0;
163 void ClearModified();
167 virtual void CommitTestedValue(uint32_t permission_mask){};
169 virtual ~config_leaf();
171 config_leaf(
bool bDetached=
false)
189 config_leaf(config_leaf &&l);
191 static void DiagShow();
192 static void FixTree();
193 void FindUnknownParent();
197 int compare(config_leaf *pl)
199 if (pl == NULL)
return -1;
200 return strcmp(GetSortNameValue(), pl->GetSortNameValue());
204 void GetBranchName(
NBString &s, config_leaf *branchRoot);
205 void RenderToFd(
int fd,
bool pretty =
false, uint32_t mask =
fConfigHidden,
bool bRawValue =
false);
206 void RenderSchemaToFd(
int fd,
bool pretty =
false, uint32_t mask =
fConfigHidden);
207 uint32_t GetFlags() {
return m_Flags; }
208 void SetFlag(uint32_t flag) { m_Flags |= flag; };
209 void SetBranchFlag(uint32_t flag);
210 void ClrFlag(uint32_t flag) { m_Flags &= (~flag); };
211 void ReloadFromFlash();
213 friend void HtmlLeafRender(
int fd, config_leaf *pl,
int eMode,
int len,
const char *extra);
279 config_obj(
bool bDetached=
false):config_leaf(bDetached){}
283 virtual void RemoveFromRootList();
285 void InstallUnderMe(config_leaf <oadd);
286 void RemoveFromChildren(config_leaf <oremove);
305 pMasterObjectLink = pObjList;
329 pMasterObjectLink = pObjList;
335 bool DoIContain(config_leaf *pl);
353 virtual void CommitTestedValue(uint32_t permission_mask);
356 virtual int Missing_ConfigEndMarker(
void *&startp)
359 return sizeof(*this);
380 friend class config_leaf;
391 pDescription =
"Root of config tree";
395 virtual int Missing_ConfigEndMarker(
void *&startp)
398 return sizeof(*this);
406 { pName =
"detached";
407 pDescription =
"Root of detached tree";
411 virtual int Missing_ConfigEndMarker(
void *&startp)
414 return sizeof(*this);
422extern detached_root_obj detached;
448 virtual void GetTextValue(
NBString &s) = 0;
467 owner.InstallUnderMe(*
this);
549 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
564 operator uint32_t()
const {
return val; };
584 pend_val = val = ci.val;
589 virtual int Missing_ConfigEndMarker(
void *&startp)
592 return sizeof(*this);
619 config_hex_uint(
config_obj &owner, uint32_t def_val,
const char *name,
const char *desc = NULL) :
config_uint(owner,def_val, name, desc)
630 config_hex_uint(uint32_t def_val,
const char *name,
const char *desc = NULL) :
config_uint(def_val,name, desc)
634 virtual void GetTextValue(
NBString &s) { s.siprintf(
"\"%08X\"", val); };
635 virtual void GetTypeValue(
NBString &s) { s =
"hexuint"; };
695 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
710 operator int()
const {
return val; };
731 pend_val = val = ci.val;
736 virtual int Missing_ConfigEndMarker(
void *&startp)
739 return sizeof(*this);
804 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
819 operator int()
const {
return val; };
832 operator float()
const {
return val; };
845 operator double()
const {
return val; };
865 pend_val = val = ci.val;
870 virtual int Missing_ConfigEndMarker(
void *&startp)
873 return sizeof(*this);
895 config_report(
config_obj &owner,
const char *value,
const char *name,
const char *desc = NULL) :
config_value(owner, name, desc)
900 config_report(
const char *value,
const char *name,
const char *desc = NULL) :
config_value(name, desc)
906 config_report(config_report &&r);
908 virtual void GetTextValue(
NBString &s);
910 virtual void CommitTestedValue(uint32_t permission_mask);
913 virtual int Missing_ConfigEndMarker(
void *&startp)
916 return sizeof(*this);
918 virtual void GetTypeValue(
NBString &s) { s =
"string"; };
920 const char *c_str() {
return m_value; };
921 void ModifyValue(
const char *nv) { m_value = nv; };
982 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
997 operator bool()
const {
return val; };
1017 pend_val = val = cb.val;
1028 pend_val = val = (i != 0);
1033 virtual int Missing_ConfigEndMarker(
void *&startp)
1036 return sizeof(*this);
1142 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
1190 pend_val = val = ci.val;
1195 virtual int Missing_ConfigEndMarker(
void *&startp)
1198 return sizeof(*this);
1222 inline const char &
operator[](
size_t pos)
const {
return val[pos]; };
1233 virtual void ExtendedSchema(
int fd,
int indent,
bool pretty);
1245 return val.Interpolate(dest);
1334 virtual void CommitTestedValue(uint32_t permission_mask);
1337 virtual void ExtendedSchema(
int fd,
int indent,
bool pretty)
1339 config_string::ExtendedSchema(fd, indent, pretty);
1340 DoSchemaLine(fd,
"format",
"password", indent, pretty);
1379 pend_val = val = ci.val;
1390 pend_val = val = ci.val;
1488 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
1535 pend_val = val = i4;
1546 pend_val = val = ci.val;
1551 virtual int Missing_ConfigEndMarker(
void *&startp)
1554 return sizeof(*this);
1567 virtual void ExtendedSchema(
int fd,
int indent,
bool pretty) { DoSchemaLine(fd,
"format",
"ipv4", indent, pretty); };
1663 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
1706 pend_val = val = i6;
1717 pend_val = val = ci.val;
1722 virtual int Missing_ConfigEndMarker(
void *&startp)
1725 return sizeof(*this);
1738 virtual void ExtendedSchema(
int fd,
int indent,
bool pretty) { DoSchemaLine(fd,
"format",
"ipv6", indent, pretty); };
1765 s.siprintf(
"\"%02X:%02X:%02X:%02X:%02X:%02X\"", val.phywadr[0] >> 8, val.phywadr[0] & 0xFF, val.phywadr[1] >> 8,
1766 val.phywadr[1] & 0xFF, val.phywadr[2] >> 8, val.phywadr[2] & 0xFF);
1816 ma = AsciiToMac(def_val);
1835 ma = AsciiToMac(def_val);
1856 pend_val = val = ci.val;
1867 pend_val = val = ci;
1871 MACADR operator+(uint32_t rhs)
1872 {
return val + rhs; }
1875 virtual int Missing_ConfigEndMarker(
void *&startp)
1878 return sizeof(*this);
1882 virtual void CommitTestedValue(uint32_t permission_mask) { val = pend_val; }
1895#define ConfigEndMarker \
1896 virtual int Missing_ConfigEndMarker(void *&startp) \
1899 return sizeof(*this); \
1936 choices = in_choices;
1954 choices = in_choices;
1967 bool IsSelected(
const char *choice) {
return (choice == value); };
1994 const char *sChoices = choices.
c_str();
1995 size_t listLen = choices.
length();
1998 if (str ==
nullptr) {
return false; }
1999 if (listLen == 0) {
return false; }
2001 while (index < listLen)
2003 size_t curVarStart = index;
2004 size_t curVarLength;
2007 while (sChoices[index] != 0 && sChoices[index] !=
',')
2012 curVarLength = index - curVarStart;
2014 if (strncmp(str, &sChoices[curVarStart], (curVarLength > strLen) ? curVarLength : strLen) == 0)
2039 const char *sStr = str.c_str();
2040 const char *sChoices = choices.
c_str();
2041 size_t length = choices.
length();
2044 if (sStr ==
nullptr) {
return false; }
2045 if (length == 0) {
return false; }
2047 while (index < length)
2049 size_t curVarStart = index;
2050 size_t curVarLength;
2053 while (sChoices[index] != 0 && sChoices[index] !=
',')
2058 curVarLength = index - curVarStart;
2060 if (strncmp(sStr, &sChoices[curVarStart], curVarLength > strLen ? curVarLength : strLen) == 0)
2086 choices = in_choices;
2100 choices = in_choices;
2152 virtual const char *GetSortNameValue() {
return "ZZZc"; };
2155 reboot_obj() :
config_bool(root, false,
"Reboot",
"Cause system reboot on save"){};
2163 virtual int Missing_ConfigEndMarker(
void *&startp)
2166 return sizeof(*this);
2173 virtual const char *GetSortNameValue() {
return "ZZZb"; };
2176 version_obj() :
config_int(root, 0,
"Version",
"Version serial number") { bNeverSet =
true; };
2186 virtual int Missing_ConfigEndMarker(
void *&startp)
2189 return sizeof(*this);
2198 empty_config_obj(
const char *name,
const char *desc = NULL) :
config_obj(name, desc){};
2199 empty_config_obj(
config_obj &owner,
const char *name,
const char *desc = NULL) :
config_obj(owner, name, desc){};
2200 empty_config_obj(empty_config_obj &&e);
2217class config_preserver_obj :
public config_obj
2224 config_preserver_obj(
const char *name,
const char *desc = NULL);
2225 config_preserver_obj(
config_obj &owner,
const char *name,
const char *desc = NULL);
2226 config_preserver_obj(config_preserver_obj &&po);
2230 virtual void CommitTestedValue(uint32_t permission_mask);
2231 virtual void GetTextValue(
NBString &s);
2232 virtual void GetRawValue(
NBString &s);
2235extern const char *AppName;
2236extern const char PlatformName[];
2241 config_report system_platform{PlatformName,
"Platform",
"Hardware Platform"};
2242 config_report system_app{AppName,
"Application",
"Application name"};
2245 SysRecord(
const char *name,
const char *desc = NULL) :
config_obj(name, desc){};
2246 SysRecord(
config_obj &owner,
const char *name,
const char *desc = NULL) :
config_obj(owner, name, desc){};
2247 SysRecord(SysRecord &&sr);
2250extern SysRecord sys;
2251extern empty_config_obj netif;
2253extern reboot_obj rebooter;
2254extern version_obj config_cur_version;
2256extern const int plat_def_baud;
2257extern const int plat_def_delay;
2258extern const int plat_def_quiet;
2259extern const int plat_def_watchdog_enabled;
2261#include <plat_cfg_types.h>
2262#ifdef PRESERVE_APP_DATA
2263extern config_preserver_obj appdata;
2265extern empty_config_obj appdata;
2278 config_uart Uart{plat_def_com,
"BootUart"};
2279 config_int BootDelay{plat_def_delay,
"BootDelay"};
2281 config_chooser sercfg_action{
"SerialConfig",
"DuringBoot",
"DuringBoot,AlwaysEnabled,PauseAfterBoot,Disabled"};
2287 MonitorRecord(
const char *name) :
config_obj(name,
"Boot monitor record")
2293 MonitorRecord(
config_obj &owner,
const char *name) :
config_obj(owner, name,
"Boot Monitor Record")
2299 MonitorRecord(MonitorRecord &&mr);
2301extern MonitorRecord monitor_config;
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
bool IsNull() const
Check if the IP address is null.
Definition nettypes.h:262
void SetFromAscii(const char *cp)
Set the IPv4 address from a character string.
void SetNull()
Set the IP address to null.
Definition nettypes.h:278
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition ipv6_addr.h:41
void SetFromAscii(const char *cp, bool bembed_v4addresses=true)
Set the IP address value of an IPADDR6 object.
void SetNull()
Set the IP address value of an IPADDR6 object to null.
Definition ipv6_addr.h:288
bool IsNull() const
Check if the IP address is null.
Definition ipv6_addr.h:101
Used to store and manipulate MAC addresses.
Definition nettypes.h:69
Lightweight alternative to C++ CString class.
Definition nbstring.h:118
const char * c_str() const
Method to pass a NBString as a constant char *.
size_t length() const
Returns the length of the string.
A class to create, read, and modify a JSON object.
Definition json_lexer.h:530
Configuration Variable for IPADDR4 (IPv4) object types.
Definition config_obj.h:1404
bool NotNull() const
Check if the IP address is not null.
Definition config_obj.h:1515
config_IPADDR4(const char *def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1479
config_IPADDR4(config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1462
config_IPADDR4(IPADDR4 def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1444
config_IPADDR4(config_obj &owner, IPADDR4 def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1429
config_IPADDR4 & operator=(const config_IPADDR4 &ci)
Copy one config_IPADDR4 object to another.
Definition config_obj.h:1544
bool IsNull() const
Check if the IP address is null.
Definition config_obj.h:1506
void SetNull()
Set the IP address to null.
Definition config_obj.h:1522
config_IPADDR4 & operator=(const IPADDR4 &i4)
Copy an IPADDR4 object value to a config_IPADDR4 object.
Definition config_obj.h:1533
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:1564
virtual void GetTextValue(NBString &s)
Get the object value as a text string with quotations to the specified NBString object.
Definition config_obj.h:1417
Configuration Variable for IPADDR (IPv6) object type.
Definition config_obj.h:1580
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:1735
config_IPADDR & operator=(const config_IPADDR &ci)
Copy one config_IPADDR object to another.
Definition config_obj.h:1715
config_IPADDR & operator=(const IPADDR &i6)
Copy an IPADDR object value to a config_IPADDR object.
Definition config_obj.h:1704
config_IPADDR(config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1637
config_IPADDR(const char *def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1654
void SetNull()
Set the IP address value of an config_IPADDR object to null.
Definition config_obj.h:1693
config_IPADDR(config_obj &owner, IPADDR def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1604
bool NotNull() const
Check if the IP address is not null.
Definition config_obj.h:1688
virtual void GetTextValue(NBString &s)
Get the object value as a text string with quotations to the specified NBString object.
Definition config_obj.h:1592
config_IPADDR(IPADDR def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1621
bool IsNull() const
Check if the IP address is null.
Definition config_obj.h:1679
Configuration Variable for MACADR object type.
Definition config_obj.h:1750
config_MACADR(config_obj &owner, MACADR def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1779
config_MACADR & operator=(const MACADR &ci)
Copy a MACADR object value to a MACADR object.
Definition config_obj.h:1865
virtual void GetTextValue(NBString &s)
Get the object value as a text string with quotations to the specified NBString object.
Definition config_obj.h:1763
config_MACADR(MACADR def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1796
config_MACADR & operator=(const config_MACADR &ci)
Copy one config_MACADR object to another.
Definition config_obj.h:1854
config_MACADR(config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1813
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:1891
config_MACADR(const char *def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1832
Boolean Configuration Variable.
Definition config_obj.h:932
config_bool(bool def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:974
config_bool & operator=(const config_bool &cb)
Copy one config_bool object to another.
Definition config_obj.h:1015
config_bool & operator=(const int i)
Assign a config_bool object value to the specified integer value.
Definition config_obj.h:1026
virtual void GetTextValue(NBString &s)
Copy the object value as a text string to the specified NBString object.
Definition config_obj.h:945
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:1044
config_bool & operator=(const bool v)
Assign the config_bool object value to the specified bool value.
Definition config_obj.h:1004
config_bool(config_obj &owner, bool def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:961
Chooser Configuration Variable - Select From a List of Items.
Definition config_obj.h:1915
const config_string & GetChoices()
Get the list of choices.
Definition config_obj.h:2075
const config_string & SetChoices(const char *in_choices)
Set the list of choices.
Definition config_obj.h:2084
virtual void GetTypeValue(NBString &s)
Assigns the object type value to the specified NBString object.
Definition config_obj.h:2147
bool IsSelected(const char *choice)
Check if a particular choice option is selected.
Definition config_obj.h:1967
config_chooser & operator=(const char *p)
Assign the selected list item from a const char* value.
Definition config_obj.h:2119
bool IsSelected(const NBString &s)
Check if a particular choice option is selected.
Definition config_obj.h:1977
config_chooser & operator=(const config_chooser &ci)
Copy one config_chooser object to another.
Definition config_obj.h:2141
config_chooser(const char *name, const char *in_value, const char *in_choices, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1951
bool IsInChoices(const char *str, size_t strLen)
Check if a string is in the list of possible choices. A comparison will continue until a null charact...
Definition config_obj.h:1992
config_chooser(config_obj &owner, const char *name, const char *in_value, const char *in_choices, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1932
bool IsInChoices(const NBString &str, size_t strLen)
Check if a string is in the list of possible choices. A comparison will continue until a null charact...
Definition config_obj.h:2037
config_chooser & operator=(const NBString &s)
Assign the config_string object value from a NBString object.
Definition config_obj.h:2130
Double Float Configuration Variable.
Definition config_obj.h:760
virtual void GetTextValue(NBString &s)
Copy the object value as a text string to the specified NBString object.
Definition config_obj.h:772
virtual void GetTypeValue(NBString &s)
Copy the object type value in the specified NBString object.
Definition config_obj.h:883
config_double(config_obj &owner, double def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:782
config_double(double def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:795
config_double & operator=(const double d)
Assign the config_double object value from a double value.
Definition config_obj.h:852
config_double & operator=(const config_double &ci)
Copy one config_double object to another.
Definition config_obj.h:863
Signed 32-bit Integer Configuration Variable.
Definition config_obj.h:649
config_int & operator=(const int i)
Assign the config_int object value to the specified int value.
Definition config_obj.h:717
virtual void GetTypeValue(NBString &s)
Copy the object type value in the specified NBString object.
Definition config_obj.h:749
config_int(config_obj &owner, int def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:672
virtual void GetTextValue(NBString &s)
Copy the object value to the specified NBString object.
Definition config_obj.h:662
config_int(int def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:685
config_int & operator=(const config_int &ci)
Copy one config_int object to another.
Definition config_obj.h:729
Configure device network name.
Definition config_netobj.h:26
Base class used to create configuration objects.
Definition config_obj.h:277
virtual void GetTypeValue(NBString &s)
Assigns the object type value to the specified NBString object.
Definition config_obj.h:378
config_obj(const char *name, const char *desc)
Object constructor.
Definition config_obj.h:323
virtual void GetTextValue(NBString &s)
Get the object value as a text string to the specified NBString object.
config_obj(config_obj &owner, const char *name, const char *desc)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:300
Password string Configuration Variable.
Definition config_obj.h:1264
config_pass(const char *def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1312
config_pass & operator=(const config_string &ci)
Copy a config_string object to a config_pass object.
Definition config_obj.h:1377
config_pass & operator=(const char *p)
Assign the config_pass object value from a const char* value.
Definition config_obj.h:1355
virtual void GetTextValue(NBString &s)
Get the config_pass object value as a text string.
config_pass & operator=(const NBString &s)
Assign the config_pass object value from a NBString object.
Definition config_obj.h:1366
config_pass(NBString def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1288
config_pass(config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1300
config_pass & operator=(const config_pass &ci)
Copy one config_pass object to another.
Definition config_obj.h:1388
config_pass(config_obj &owner, NBString def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1276
virtual void GetRawValue(NBString &s)
Copy the raw config_string object value to the NBString object.
String Configuration Variable.
Definition config_obj.h:1055
const char * c_str() const
Returns the object value as a string.
Definition config_obj.h:1206
virtual void GetTextValue(NBString &s)
Get the object value (as a text string with quotations) to the specified NBString object.
config_string(config_obj &owner, NBString def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1088
const char & operator[](size_t pos) const
Return the value of a character in the string.
Definition config_obj.h:1222
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:1231
config_string & operator=(const char *p)
Assign the config_string object value from a const char* string.
Definition config_obj.h:1166
config_string(config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:1120
config_string & operator=(const NBString &s)
Assign the config_string object value from a NBString object.
Definition config_obj.h:1177
void SetEnumList(NBString s)
Renders the data used to explain the schema/descriptions for the list of choices.
Definition config_obj.h:1150
config_string(NBString def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1103
config_string & operator=(const config_string &ci)
Copy one config_string object to another.
Definition config_obj.h:1188
config_string(const char *def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:1135
size_t length() const
Returns the string length in bytes.
Definition config_obj.h:1213
Unsigned 32-bit Integer Configuration Variable.
Definition config_obj.h:504
config_uint(uint32_t def_val, const char *name, const char *desc=NULL)
Object constructor.
Definition config_obj.h:540
virtual void GetTextValue(NBString &s)
Copy the object value to the specified NBString object.
Definition config_obj.h:517
config_uint(config_obj &owner, uint32_t def_val, const char *name, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:527
config_uint & operator=(const uint32_t i)
Assign the config_uint object value from a uint32_t value.
Definition config_obj.h:571
virtual void GetTypeValue(NBString &s)
Copy the object type value to the specified NBString object.
Definition config_obj.h:602
config_uint & operator=(const config_uint &ci)
Copy one config_uint object to another.
Definition config_obj.h:582
Base class used to create a configuration value.
Definition config_obj.h:446
config_value(config_obj &owner, const char *name, const char *desc)
Object constructor with the parent/owner leaf parameter.
Definition config_obj.h:463
config_value(const char *name, const char *desc)
Object constructor.
Definition config_obj.h:484
const uint32_t fConfigModified
Variable has been modified, but not yet saved.
Definition config_obj.h:73
const uint32_t fConfigNeedReboot
System reboot required for changes to take effect.
Definition config_obj.h:77
const uint32_t fConfigNoObscure
Do not obscure the value.
Definition config_obj.h:76
const uint32_t fConfigValueLeaf
Value is a leaf.
Definition config_obj.h:71
const uint32_t fConfigHidden
Not visible to configuration web server display.
Definition config_obj.h:74
const uint32_t fConfigNoSave
Do not save to flash memory when save functions are called.
Definition config_obj.h:75
const uint32_t fConfigNoReload
Disable reloading value from flash during a call to ReloadFromFlash.
Definition config_obj.h:78
const uint32_t fConfigDetached
Disable reloading value from flash during a call to ReloadFromFlash.
Definition config_obj.h:79
const uint32_t fConfigIsDefault
Value is unchanged from the default, i.e. wes never set.
Definition config_obj.h:80
const uint32_t fConfigReadOnly
Variable is read-only.
Definition config_obj.h:72
void SaveConfigToStorage()
Save configuration to flash storage.
IPADDR6 IPADDR
IPADDR Object Type (either v4 or v6)
Definition nettypes.h:543
class MACADR MACADR
Used to store and manipulate MAC addresses.