automotive-dlt
|
#include <search.h>
Go to the source code of this file.
Data Structures | |
struct | DltConfigFileSection |
struct | DltConfigFile |
Macros | |
#define | DLT_CONFIG_FILE_PATH_MAX_LEN 100 /* absolute path including filename */ |
#define | DLT_CONFIG_FILE_ENTRY_MAX_LEN 100 /* Entry for section, key and value */ |
#define | DLT_CONFIG_FILE_LINE_MAX_LEN 210 |
#define | DLT_CONFIG_FILE_SECTIONS_MAX 100 |
#define | DLT_CONFIG_FILE_KEYS_MAX 25 /* Maximal keys per section */ |
Functions | |
DltConfigFile * | dlt_config_file_init (char *file_name) |
void | dlt_config_file_release (DltConfigFile *file) |
int | dlt_config_file_get_section_name (const DltConfigFile *file, int num, char *name) |
int | dlt_config_file_get_num_sections (const DltConfigFile *file, int *num) |
int | dlt_config_file_get_value (const DltConfigFile *file, const char *section, const char *key, char *value) |
Definition in file dlt_config_file_parser.h.
#define DLT_CONFIG_FILE_ENTRY_MAX_LEN 100 /* Entry for section, key and value */ |
Definition at line 66 of file dlt_config_file_parser.h.
Referenced by dlt_config_file_find_section(), dlt_config_file_get_key_value(), dlt_config_file_get_section_name(), dlt_config_file_get_section_name_from_string(), dlt_config_file_get_value(), dlt_config_file_is_section_name(), dlt_config_file_read_file(), dlt_config_file_read_line(), dlt_config_file_release(), dlt_config_file_set_section(), dlt_config_file_set_section_data(), dlt_daemon_setup_filter_properties(), dlt_gateway_configure(), and dlt_logstorage_store_filters().
#define DLT_CONFIG_FILE_KEYS_MAX 25 /* Maximal keys per section */ |
Definition at line 69 of file dlt_config_file_parser.h.
Referenced by dlt_config_file_set_section(), and dlt_config_file_set_section_data().
#define DLT_CONFIG_FILE_LINE_MAX_LEN 210 |
Definition at line 67 of file dlt_config_file_parser.h.
Referenced by dlt_config_file_read_file().
#define DLT_CONFIG_FILE_PATH_MAX_LEN 100 /* absolute path including filename */ |
Definition at line 65 of file dlt_config_file_parser.h.
Referenced by dlt_config_file_init().
#define DLT_CONFIG_FILE_SECTIONS_MAX 100 |
Definition at line 68 of file dlt_config_file_parser.h.
Referenced by dlt_config_file_init(), and dlt_config_file_set_section().
int dlt_config_file_get_num_sections | ( | const DltConfigFile * | file, |
int * | num | ||
) |
dlt_config_file_get_num_sections
Get the number of sections inside configuration file
[in] | file | DltConfigFile |
[out] | num | Number of sections inside configuration file |
Definition at line 524 of file dlt_config_file_parser.c.
References NULL, and DltConfigFile::num_sections.
Referenced by dlt_gateway_configure(), and dlt_logstorage_store_filters().
int dlt_config_file_get_section_name | ( | const DltConfigFile * | file, |
int | num, | ||
char * | name | ||
) |
dlt_config_file_get_section_name
Get name of section number.
[in] | file | DltConfigFile |
[in] | num | Number of section |
[out] | section | Section name |
Definition at line 512 of file dlt_config_file_parser.c.
References DLT_CONFIG_FILE_ENTRY_MAX_LEN, NULL, DltConfigFile::num_sections, and DltConfigFile::sections.
Referenced by dlt_gateway_configure(), and dlt_logstorage_store_filters().
int dlt_config_file_get_value | ( | const DltConfigFile * | file, |
const char * | section, | ||
const char * | key, | ||
char * | value | ||
) |
dlt_config_file_get_value
Get value of key in specified section.
[in] | file | DltConfigFile |
[in] | section | Name of section |
[in] | key | Key |
[out] | value | Value |
Definition at line 534 of file dlt_config_file_parser.c.
References DltConfigFileSection::data, DLT_CONFIG_FILE_ENTRY_MAX_LEN, dlt_config_file_find_section(), dlt_log(), NULL, and DltConfigFile::sections.
Referenced by dlt_daemon_setup_filter_properties(), and dlt_gateway_configure().
DltConfigFile* dlt_config_file_init | ( | char * | file_name | ) |
dlt_config_file_init
Load the configuration file and stores all data in internal data structures.
file_name | File to be opened |
Definition at line 441 of file dlt_config_file_parser.c.
References DLT_CONFIG_FILE_PATH_MAX_LEN, dlt_config_file_read_file(), DLT_CONFIG_FILE_SECTIONS_MAX, dlt_log(), NULL, and DltConfigFile::sections.
Referenced by dlt_gateway_configure(), and dlt_logstorage_store_filters().
void dlt_config_file_release | ( | DltConfigFile * | file | ) |
dlt_config_file_release
Release config file and frees all internal data. Has to be called after after all data is read.
file | DltConfigFile |
Definition at line 477 of file dlt_config_file_parser.c.
References DltConfigFileSection::data, DLT_CONFIG_FILE_ENTRY_MAX_LEN, DltConfigFileSection::keys, DltConfigFileSection::name, NULL, DltConfigFileSection::num_entries, DltConfigFile::num_sections, and DltConfigFile::sections.
Referenced by dlt_gateway_configure(), and dlt_logstorage_store_filters().