NetBurner 3.5.6
PDF Version |
A NetBurner embedded systems application demonstrating the use of persistent configuration variables through an interactive serial interface.
This application showcases the NetBurner config system, which provides persistent storage for both system-defined boot parameters and user-defined variables. The config system maintains values across power cycles, making it ideal for storing device settings, calibration data, and application parameters.
The application demonstrates usage of several config object types:
config_string
- String valuesconfig_int
- Signed integer values config_uint
- Unsigned integer valuesconfig_bool
- Boolean valuesconfig_double
- Double precision floating pointconfig_chooser
- Multiple choice optionsconfig_pass
- Password fieldsconfig_IPADDR4
- IPv4 addressesconfig_IPADDR6
- IPv6 addressesconfig_MACADR
- MAC addressesThe application defines three global configuration variables:
Each variable is initialized with:
appdata
)The application provides an interactive menu system accessible via serial interface:
Command | Description |
---|---|
C | Show Config Tree - Display complete configuration hierarchy |
S | Show and Set gSingleString - View/modify string variable |
V | Show and Set gMyOwnVal - View/modify signed integer variable |
U | Show and Set gMyOwnuVal - View/modify unsigned integer variable |
N | New/Create dynamic variable - Create new config variable at runtime |
D | Delete dynamic variable - Remove dynamically created variable |
Q | Query dynamic variable - Check if dynamic variable exists and show value |
? | Show Command List - Display available commands |
arp.h
- ARP protocol supporthttp.h
- HTTP server functionalityinit.h
- System initializationnetinterface.h
- Network interface managementserial.h
- Serial communicationconfig_server.h
- Configuration systemCompile using the NetBurner development environment with standard build tools. Ensure all NetBurner libraries are properly linked.
Upon boot, the application displays:
C
to see the complete hierarchyS
, V
, or U
to change valuesN
to create, D
to delete, and Q
to query runtime variables?
to display the command menuAll configuration changes are automatically saved to non-volatile storage using SaveConfigToStorage()
. Values persist across power cycles and system resets.
The application demonstrates creating config variables at runtime using the new
operator and properly registering them with FixNonStaticObject()
.
The application initializes network interfaces and displays connection information, showing integration with NetBurner's networking stack.
Built-in system diagnostics are enabled for development and debugging purposes.
delete
FixNonStaticObject()
for dynamically created variablesThe application runs in a single-threaded context with periodic delays using OSTimeDly()
.
EnableSystemDiagnostics()
for production buildsTICKS_PER_SECOND
delays based on application requirementsC
command) to verify variable organization