14.2.3.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. A line shall be an ordinary #define preprocessor directive, for example, to set the maximum number of childs that the node, provided it is a router or the coordinator, can accept to 5 put the following line in config:

#define CS_MAX_CHILDREN_AMOUNT 5

Fortunately, most of the parameters have default values that fit typical application configuration well, at least for the first time. The default values are given in csDefaults.h which is a part of the stack. This file must not be changed. If the application needs to modify a default value it shall perform this in the application config file.

To change values of the parameters that can be configured at run time use the CS_ReadParameter() function. For both compile-time and run-time configured parameters the application can read their value via the CS_WriteParameter() function. To find out the detailed description proceed to the documentation of these function.