![]() |
|
PhoenixSwarm
3.5.0
Library to ease communication between daemons
|
#include "parser_json.h"#include "parser_toml.h"#include "parser_yml.h"#include "daemon_load_config.h"#include "daemon_config_exception.h"#include <sstream>
Include dependency graph for daemon_load_config.cpp:Go to the source code of this file.
Functions | |
| void | daemon_load_config (PLog &log, ConfigNode &dico, const PPath &configFile) |
| Load the daemon config into a ConfigNode. | |
| void | daemon_load_config (PLog &log, ConfigNode &dico, const PString &inputConfig, ConfigFormat::ConfigFormat format) |
| Load the daemon config into a ConfigNode from a json string. | |
| PString | daemon_loadString (const ConfigNode &dico, const PString &attributeName) |
| Load a string value. | |
| void | daemon_read_configNode (DaemonConfig &daemonConfig, MapDaemonConfig &mapDaemon, PLog &log, MapTimeout &mapTimeout, const ConfigNode *&extraConfigParam, const ConfigNode &dico, const PString &daemonName) |
| Read the ConfigNode to initialise current Daemon. | |
| void | set_daemon_config_from_node (DaemonConfig &config, PLog &log, MapTimeout &mapTimeout, const ConfigNode &nodeDict, bool throwOnError) |
| void daemon_load_config | ( | PLog & | log, |
| ConfigNode & | dico, | ||
| const PPath & | configFile ) |
Load the daemon config into a ConfigNode.
| [out] | log | : log of the Daemon |
| [out] | dico | : ConfigNode with all the configuration |
| configFile | : file name of the configuration |
Definition at line 45 of file daemon_load_config.cpp.
| void daemon_load_config | ( | PLog & | log, |
| ConfigNode & | dico, | ||
| const PString & | inputConfig, | ||
| ConfigFormat::ConfigFormat | format ) |
Load the daemon config into a ConfigNode from a json string.
| [out] | log | : log of the Daemon |
| [out] | dico | : ConfigNode with all the configuration |
| inputConfig | : input string of the configuration | |
| format | : format of the configuration |
Definition at line 21 of file daemon_load_config.cpp.
References ConfigFormat::JSON, ConfigFormat::TOML, and ConfigFormat::YAML.
Referenced by BaseDaemon::load(), and BaseDaemon::load().
Here is the caller graph for this function:| PString daemon_loadString | ( | const ConfigNode & | dico, |
| const PString & | attributeName ) |
Load a string value.
| dico | : DicoValue to be used |
| attributeName | : name of the attribute to read |
Definition at line 69 of file daemon_load_config.cpp.
Referenced by daemon_read_configNode(), BaseDaemon::loadConfigFromNode(), and set_daemon_config_from_node().
Here is the caller graph for this function:| void daemon_read_configNode | ( | DaemonConfig & | daemonConfig, |
| MapDaemonConfig & | mapDaemon, | ||
| PLog & | log, | ||
| MapTimeout & | mapTimeout, | ||
| const ConfigNode *& | extraConfigParam, | ||
| const ConfigNode & | dico, | ||
| const PString & | daemonName ) |
Read the ConfigNode to initialise current Daemon.
| [out] | daemonConfig | : current Daemon configuration |
| [out] | mapDaemon | : map of all Daemon configuration |
| [out] | log | : log of the Daemon |
| [out] | mapTimeout | : map of all Daemon timeout |
| [out] | extraConfigParam | : pointer to extra configuration parameters of the Daemon (extra_parameter) |
| dico | : ConfigNode to be used | |
| daemonName | : name of the current Daemon to load |
Definition at line 114 of file daemon_load_config.cpp.
References daemon_loadString(), DaemonConfig::getHostName(), DaemonConfig::getName(), DaemonConfig::getReceivingPort(), set_daemon_config_from_node(), and DaemonConfig::setName().
Referenced by BaseDaemon::loadConfigFromNode().
Here is the call graph for this function:
Here is the caller graph for this function:| void set_daemon_config_from_node | ( | DaemonConfig & | config, |
| PLog & | log, | ||
| MapTimeout & | mapTimeout, | ||
| const ConfigNode & | nodeDict, | ||
| bool | throwOnError ) |
Set a daemon config from a configNode
| config | : configuration of the daemon |
| log | : log of the current daemon |
| mapTimeout | : map of all Daemon timeout |
| nodeDict | : ConfigNode with data to set the daemon config with. |
| throwOnError | if true: an error is thrown if setting the configuration fails. Otherwise an error is logged but execution continues. |
Definition at line 81 of file daemon_load_config.cpp.
References daemon_loadString(), DaemonConfig::getName(), DaemonConfig::getReceivingPort(), DaemonConfig::setDescription(), DaemonConfig::setHostName(), DaemonConfig::setName(), DaemonConfig::setReceivingPort(), DaemonConfig::setStatHistLowerBound(), DaemonConfig::setStatHistUpperBound(), DaemonConfig::setStatNbBin(), and DaemonConfig::setStatTimerPeriodMs().
Referenced by daemon_read_configNode().
Here is the call graph for this function:
Here is the caller graph for this function: