42#define CONFIG_KEY_MQTT_HOST "mqtt.host"
43#define CONFIG_KEY_MQTT_PORT "mqtt.port"
44#define CONFIG_KEY_MQTT_CLIENT_ID "mqtt.client_id"
45#define CONFIG_KEY_MQTT_CAFILE "mqtt.cafile"
46#define CONFIG_KEY_MQTT_CERTFILE "mqtt.certfile"
47#define CONFIG_KEY_MQTT_KEYFILE "mqtt.keyfile"
48#define CONFIG_KEY_LOG_LEVEL "log.level"
49#define CONFIG_KEY_LOG_TAG_LEVEL "log.tag_level"
52#define DEFAULT_CONFIG_PATH "/etc/uic/uic.cfg"
73 const char *default_value);
config_status_t config_add_string(const char *name, const char *help, const char *default_value)
Add string configuration.
config_status_t config_add_bool(const char *name, const char *help, bool default_value)
Add a bool configuration.
config_status_t config_get_as_string(const char *name, const char **result)
Get the config as a C-string.
config_status_t
Definition: config.h:54
config_status_t config_get_as_bool(const char *name, bool *result)
Get the config as bool.
config_status_t config_get_as_double(const char *name, double *result)
Get the config as a double.
config_status_t config_add_double(const char *name, const char *help, double default_value)
Add a double configuration.
config_status_t config_get_as_int(const char *name, int *result)
Get the config as an integer.
config_status_t config_add_int(const char *name, const char *help, int default_value)
Add an integer configuration.
config_status_t config_parse(int argc, char **argv, const char *version)
Parse command line arguments to the config system.
void config_reset()
Reset the config.
config_status_t config_has_flag(const char *name)
Check is a config paramter exists.
config_status_t config_add_flag(const char *name, const char *help)
Add a flag configuration.
@ CONFIG_STATUS_INVALID_TYPE
Definition: config.h:58
@ CONFIG_STATUS_INFO_MESSAGE
Definition: config.h:60
@ CONFIG_STATUS_ERROR
Definition: config.h:57
@ CONFIG_STATUS_NOK
Definition: config.h:56
@ CONFIG_STATUS_DOES_NOT_EXIST
Definition: config.h:59
@ CONFIG_STATUS_OK
Definition: config.h:55