This is a set of functions which control the read-in of configuration data.
更多...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include <errno.h>
#include <ctype.h>
#include <limits.h>
#include "../include/var_struc.h"
|
| static void | config_check (void) |
| | This function check whether the configuration data is reasonable and set the default. 更多...
|
| |
| static int | config_read (FILE *fp) |
| | This function read the configuration data file, and store the configuration data in the array "config". 更多...
|
| |
| void | configurate (const char *add_in) |
| | This function controls configuration data reading and validation. 更多...
|
| |
This is a set of functions which control the read-in of configuration data.
◆ config_check()
| static void config_check |
( |
void |
| ) |
|
|
static |
This function check whether the configuration data is reasonable and set the default.
◆ config_read()
| static int config_read |
( |
FILE * |
fp | ) |
|
|
static |
This function read the configuration data file, and store the configuration data in the array "config".
- 参数
-
| [in] | fp | The pointer to the configuration data file. |
- 返回
- Configuration data file read status.
- 返回值
-
| 1 | Success to read in configuration data file. |
| 0 | Failure to read in configuration data file. |
◆ configurate()
| void configurate |
( |
const char * |
add_in | ) |
|
This function controls configuration data reading and validation.
The parameters in the configuration data file refer to 'doc/config.csv'.
- 参数
-
| [in] | add_in | Adress of the initial data folder of the test example. |