NetBurner 3.5.0
PDF Version
 
Configuration Server

Classes

class  WebConfigServlet
 Class to run web configurator. More...
 

Functions

void EnableConfigMirror ()
 Enable the configuration mirror.
 
void SaveConfigToStorage ()
 Write all pending data to flash memory.
 
size_t ConfigSize ()
 Returns the number of bytes currently in use by configuration flash.
 
size_t ConfigMaxSize ()
 Returns the number of bytes available in configuration flash.
 

Detailed Description

#include< config_server.h >

The configuration server manages the configuration variables, which can be used internally, or optionally presented on a configuration server web page. Please refer to the configuration object section for more details.

There is a default factory web interface that is normally running on the device as a user interface to set configuration options. Enabling the Configuration Mirror provides a method to replace the factory interface with your own custom interface. The is an easy way to use your company brand on the device.

Any time a configuration variable is modified, it is marked as pending. Modified values will not be written to flash memory until a call to SaveConfigToStorage() is executed. Note that if a user clicks on the Update button on the configuration web page, values will be written to flash.

Function Documentation

◆ ConfigMaxSize()

size_t ConfigMaxSize ( )

#include <config_server.h>

Returns the number of bytes available in configuration flash.

Returns
The maximum number of bytes available. This function is implemented in hal.cpp

◆ ConfigSize()

size_t ConfigSize ( )

#include <config_server.h>

Returns the number of bytes currently in use by configuration flash.

Returns
Number of bytes in use

◆ EnableConfigMirror()

void EnableConfigMirror ( )

#include <config_server.h>

Enable the configuration mirror.

When enabled, the application configuration web interface will replace the default system web interface. In this way you can easily customize and brand the configuration web interface for your company.

Note
This is an empty function. To enable the config mirror, it needs to be called within the application code, which in turn forces the function to be linked during compilation. The linking is what enables the config mirror.

◆ SaveConfigToStorage()

void SaveConfigToStorage ( )

#include <config_server.h>

Write all pending data to flash memory.

Checks the pending flag of all configuration system objects and writes updates to flash memory