MeshProtocolSimulator  1.0.0
Public Member Functions | Public Attributes | List of all members
JSONSettings Struct Reference

Public Member Functions

void reset ()
 Completelly clears settings to it's default state.
 
void validateAndSort ()
 Removes extra settings or duplicate settings and sorts them by MAC address. If settings for some nodes are missing, default settings are added for them. If gateway node is missing, the node with the lowest address will be set as gateway. More...
 

Public Attributes

bool auto_pause = false
 
std::chrono::seconds simulation_limit
 
std::vector< NodeConnectionsnode_connections
 
std::vector< NodeSettingsnode_settings
 

Member Function Documentation

◆ validateAndSort()

void JSONSettings::validateAndSort ( )

Removes extra settings or duplicate settings and sorts them by MAC address. If settings for some nodes are missing, default settings are added for them. If gateway node is missing, the node with the lowest address will be set as gateway.

Note
Nodes, that will be in network are specified by node connections, not by node settings, that's why node settings are added or removed, but connections stays unchanged.

The documentation for this struct was generated from the following files: