1#ifndef CAPIO_CL_CONFIGURATION_H
2#define CAPIO_CL_CONFIGURATION_H
4#include <unordered_map>
41 std::unordered_map<std::string, std::string> config;
49 void set(
const std::string &key, std::string value);
64 void load(
const std::filesystem::path &path);
76 void getParameter(
const std::string &key,
int *value)
const;
83 void getParameter(
const std::string &key, std::string *value)
const;
103 [[nodiscard]]
const char *
what() const noexcept
override {
return message.c_str(); }
Custom exception thrown when handling a CAPIO-CL TOML configuration file.
Definition configuration.h:89
CapioClConfigurationException(const std::string &msg)
Construct a new CAPIO-CL Exception.
Definition configuration.cpp:91
const char * what() const noexcept override
Definition configuration.h:103
Load configuration and store it from a CAPIO-CL TOML configuration file.
Definition configuration.h:39
void getParameter(const std::string &key, int *value) const
Definition configuration.cpp:73
void load(const std::filesystem::path &path)
Definition configuration.cpp:57
void set(const std::string &key, std::string value)
Definition configuration.cpp:49
void loadDefaults()
Definition configuration.cpp:37
Engine for managing CAPIO-CL configuration entries. The CapioCLEngine class stores and manages config...
Definition engine.h:83
Struct containing key value pairs for capio-cl runtime configuration.
Definition configuration.h:9
std::string v
Value of option.
Definition configuration.h:13
std::string k
Key of option.
Definition configuration.h:11
Defaults values keys for runtime options of CAPIO-CL.
Definition configuration.h:17
static ConfigurationEntry DEFAULT_API_MULTICAST_PORT
IP multicast port for receiving and sending changes in the CapioCL configuration.
Definition configuration.h:27
static ConfigurationEntry DEFAULT_MONITOR_FS_ENABLED
Enable File system monitor by default.
Definition configuration.h:21
static ConfigurationEntry DEFAULT_API_MULTICAST_IP
IP multicast address for receiving and sending changes in the CapioCL configuration.
Definition configuration.h:24
static ConfigurationEntry DEFAULT_MONITOR_MCAST_ENABLED
Enable multicast monitor by default.
Definition configuration.h:18
static ConfigurationEntry DEFAULT_MONITOR_HOMENODE_PORT
Multicast monitor homenode PORT.
Definition configuration.h:15
static ConfigurationEntry DEFAULT_MONITOR_HOMENODE_IP
Multicast monitor homenode IP.
Definition configuration.h:12
static ConfigurationEntry DEFAULT_MONITOR_MCAST_DELAY
Multicast monitor delay before following operation.
Definition configuration.h:9
static ConfigurationEntry DEFAULT_MONITOR_MCAST_PORT
Multicast monitor commit PORT.
Definition configuration.h:6
static ConfigurationEntry DEFAULT_MONITOR_MCAST_IP
Multicast monitor commit IP.
Definition configuration.h:3