The configuration API is a powerful toolkit that automatically creates configuration parameters for the device. With this example we will see how easy we can create these parameters, and how they are published in different ways to the user.
The first step is to create an internal data structure where the programmer will receive the values that the user configures.
typedef struct VoipCfg
You can see the comments in each parameter. They are very important because the are the information that the system will show to the user to describe such parameter. Also, there are comments assigning values to a string. That is, "description" = <numeric value>. So, the system is going to show the description better than the value, and the user can choose a option instead to type the value.
You can include structures inside structures as a maximun of three levels, and also tables.
Once, we have the structure, we must embed it in our EasyTasks system. First, we buid it to generate the C source code.
This will generate the CfgTable.c file. Thats all. Now, the users can configure our embedded system using:
A ".ini" like file:
A WEB page: