4.2.1 Get or Set a CS Parameter

There are two options to assign a value to the CS parameter. One is to specify the value at compilation time by adding a line or changing an existing one in the config file. The user must use an ordinary #define preprocessor directive. For example, to set the maximum number of children that a node can accept, provided it is a router or the coordinator, to five, the user can add the following line to the config:
#define CS_MAX_CHILDREN_AMOUNT 5
At the start, most of the parameters are set to default values that work well for typical application configurations. The default values are given in csDefaults.h, which is a part of the stack. If the application needs to modify a default value, the user must perform this in the application config file.
Attention: The user must not change the csDefaults.h file.

To change values of the parameters that are configurable at run-time, use the CS_WriteParameter() function. For parameters configured at both compile-time and run-time, the user can read their value using the CS_ReadParameter() function. For a more detailed description, refer to the CS_ReadParameter() and CS_WriteParameter().