NetBurner 3.5.6
PDF Version |
Configuration System Variables. More...
Topics | |
Configuration Variable Flags | |
Classes | |
class | config_obj |
Base class used to create configuration objects. More... | |
class | config_value |
Base class used to create a configuration value. More... | |
class | config_uint |
Unsigned 32-bit Integer Configuration Variable. More... | |
class | config_int |
Signed 32-bit Integer Configuration Variable. More... | |
class | config_double |
Double Float Configuration Variable. More... | |
class | config_bool |
Boolean Configuration Variable. More... | |
class | config_string |
String Configuration Variable. More... | |
class | config_pass |
Password string Configuration Variable. More... | |
class | config_IPADDR4 |
Configuration Variable for IPADDR4 (IPv4) object types. More... | |
class | config_IPADDR |
Configuration Variable for IPADDR (IPv6) object type. More... | |
class | config_MACADR |
Configuration Variable for MACADR object type. More... | |
class | config_chooser |
Chooser Configuration Variable - Select From a List of Items. More... | |
class | config_int_limit |
A config_int with minimum and/or maximum values Attempting to set a value lower than the minimum or greater than the maximum will fail with an error both programmatically and in the Config Web UI. More... | |
class | config_uint_limit |
A config_uint with minimum and/or maximum values Attempting to set a value lower than the minimum or greater than the maximum will fail with an error both programmatically and in the Config Web UI. More... | |
class | config_double_limit |
A config_double with minimum and/or maximum values Attempting to set a value lower than the minimum or greater than the maximum will fail with an error both programmatically and in the Config Web UI. More... | |
class | config_string_limit |
A config_string with minimum and/or maximum lengths Attempting to set a value shorter than the minimum or longer than the maximum will fail with an error both programmatically and in the Config Web UI. More... | |
class | config_pass_limit |
A config_pass with minimum and/or maximum lengths Attempting to set a value shorter than the minimum or longer than the maximum will fail with an error both programmatically and in the Config Web UI. More... | |
Functions | |
void | SaveConfigToStorage () |
Save configuration to flash storage. | |
void | OverrideConfig () |
Create this function to override config settings. | |
Configuration System Variables.
#include< config_obj.h>
Configuration variable objects are part of the NetBurner 3.x configuration system. The use of configuration objects facilitates a much easier method to create and store non-volatile information for both system configuration and for user application configuration and storage. They use a JSON interface so the information can be easily downloaded to save a configuration, or uploaded to configure the entire device at one time, such as in production bring-up. This includes system configuration such as IP addresses, and also any settings specific to your application.
The JSON value types include: integer, unsigned integer, float, boolean and string. There are also objects for IPv4 IP, IPv6 IP, MAC addresses, passwords, and selection lists options. In JSON everything is represented as a string, so there are object member functions to convert between values. These functions make use of the NBString class.
For customers using the 2.x tools, the User Parameter flash sector method is still available, but we do recommend converting to the new configuration system. In 3.x you have the ability to access the data through a web configuration page and also through JSON, but you can certainly choose not to use those features and treat the configuration system as internal storage, and any configuration can be done through your application just as with the 2.x tool set.
void OverrideConfig | ( | ) |
#include <config_obj.h>
Create this function to override config settings.
This function exists as a weak reference. So you just need to create it and the force set any configvariabls you want to control. This will be called after config is loaded before any config is used by anything. It will also be called when anyone calls rever on the confg system.