APIs, concepts, guides, and more

◆ ConfigSet()

void ConfigSet ( const Config & config)
Description:
ConfigSet writes the node's desired configuration, which is read at ENI-generation time (MotionController::NetworkEniGenerate) and translated into the generated ENI. The typical flow: start the network, ConfigSet on the desired nodes, regenerate the ENI, restart. Because membership travels in the ENI, it survives subsequent restarts; repeat this flow only to change the grouping. See Sync Groups.
Sample Code:
controller->NetworkStart(); // 1. discover the network
RapidCodeNetworkNode::Config config = node->ConfigGet();
config.SyncGroup = 1; // 2. stage it (0 = default group)
node->ConfigSet(config);
controller->NetworkEniGenerate(); // 3. consumes the staged configs
controller->NetworkShutdown(); // 4. restart on the new ENI
controller->NetworkStart();
Note
This is desired/staged config, not runtime state: network discovery re-zeroes it on every restart by design – after a restart, the loaded ENI is the source of truth and the node's ACTUAL group is reported by Status.SyncGroupId (StatusGet), not ConfigGet.
Throws PARAM_INVALID if Config.SyncGroup is outside the supported sync group range, [0, MotionController::NetworkSyncGroupCountMaximum).
See also
Config, ConfigGet, Status