devusage.md 1.67 KB
Newer Older
frtabu's avatar
frtabu committed
1 2 3 4 5 6 7
The configuration module objectives are 
1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
1. Use a common configuration API in all oai modules
1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.  

As a developer you may need to look at these sections:

Francois TABURET's avatar
Francois TABURET committed
8 9 10 11
* [add parameters in an existing section](devusage/addaparam)
* [add a parameter set, in a new section](devusage/addparamset)
* [configuration module API](devusage/api) 
* [configuration module public structures](devusage/struct)  
frtabu's avatar
frtabu committed
12 13 14 15 16 17 18 19

Whatever your need is, configuration module usage examples can be found in oai sources:  
*  complex example, using all the configuration module functionalities, including parameter checking: 
[NB-IoT configuration code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_config.c) and [NB-IoT configuration include file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_paramdef.h)
*  very simple example, just reading a parameter set corresponding to a dedicated section:  the telnetsrv_autoinit function in [common/utils/telnetsrv/telnetsrv.c, around line 726](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv.c#L726)
*  an example with run-time definition of parameters, in the logging sub-system: the log_getconfig function at the top of [openair2/UTIL/LOG/log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/UTIL/LOG/log.c)


Francois TABURET's avatar
Francois TABURET committed
20
[Configuration module home](../config.md)