8 #ifndef FCF_DEVMGR_COMMON_CONFIG_HPP_
9 #define FCF_DEVMGR_COMMON_CONFIG_HPP_
15 #include <yaml-cpp/yaml.h>
18 #include <dit/fits/fits.hpp>
21 #include <fcf/devmgr/common/events.rad.hpp>
87 void LoadConfig(
const std::string& filename =
"");
170 virtual dit::did::Did&
GetDid();
180 virtual void GetConfigList(std::vector<std::string>& cfg_list);
198 YAML::Node m_config_node;
199 std::string m_server_id;
200 std::string m_proc_name;
201 std::string m_log_level;
202 std::string m_config_filename;
203 std::string m_scxml_filename;
204 std::string m_db_host_endpoint;
205 int m_db_timeout_sec;
206 std::string m_req_endpoint;
207 std::string m_pub_endpoint;
208 std::string m_fits_prefix;
210 int m_num_dictionaries;
211 unsigned int m_cmd_tout;
219 #endif // FCF_DEVMGR_COMMON_CONFIG_HPP_
IConfig class header file.
const std::string GetMsgReplierEndpoint() const
Definition: config.cpp:338
virtual dit::did::Did & GetDid()
Definition: config.cpp:447
constexpr auto CONFIG_DEFAULT_FIT_PREFIX
Definition: config.hpp:41
const std::string GetConfigFilename() const
Definition: config.cpp:376
virtual ~Config()
Definition: config.cpp:63
constexpr auto CONFIG_DEFAULT_DB_ENDPOINT
Definition: config.hpp:36
constexpr unsigned int CONFIG_DEFAULT_CMD_TOUT
Definition: config.hpp:43
bool ParseOptions(int argc, char *argv[])
Definition: config.cpp:67
virtual void GetConfigList(std::vector< std::string > &cfg_list)
Get configuration list.
Definition: config.cpp:454
Config()
Definition: config.cpp:30
constexpr auto CONFIG_ENVVAR_DBHOST
Definition: config.hpp:48
constexpr auto CONFIG_DEFAULT_REQ_ENDPOINT
Definition: config.hpp:38
const std::string GetDbEndpoint() const
Definition: config.cpp:345
const std::string GetDeviceType(const std::string &name)
GetDeviceType.
Definition: config.cpp:413
Config & operator=(const Config &)=delete
Disable copy constructor.
Definition: config.hpp:54
const std::string GetServerId() const
Definition: config.cpp:333
constexpr auto CONFIG_DEFAULT_PUB_ENDPOINT
Definition: config.hpp:39
constexpr auto CONFIG_DEFAULT_FILENAME
Definition: config.hpp:33
const std::string GetDeviceName(const int &device_index)
GetDeviceName.
Definition: config.cpp:400
constexpr auto CONFIG_DEFAULT_LOGLEVEL
Definition: config.hpp:35
constexpr int CONFIG_DEFAULT_DB_TIMEOUT
Definition: config.hpp:37
constexpr auto CONFIG_DEFAULT_SCXML_FILENAME
Definition: config.hpp:34
constexpr auto CONFIG_DEFAULT_PROCNAME
Definition: config.hpp:30
constexpr auto CONFIG_DEFAULT_DICTIONARIES
Definition: config.hpp:40
const std::string GetFitsPrefix() const
Get FITS prefix.
Definition: config.cpp:357
const timeval GetDbTimeout() const
Definition: config.cpp:363
Definition: iConfig.hpp:22
const std::string GetLogLevel() const
Definition: config.cpp:388
const std::string GetProcName() const
Definition: config.cpp:382
const std::string GetPubEndpoint() const
Definition: config.cpp:351
const std::string GetSmScxmlFilename() const
Definition: config.cpp:370
void LoadConfig(const std::string &filename="")
Definition: config.cpp:145
const int GetNumDevices()
GetNumDevices.
Definition: config.cpp:394
const std::string GetDeviceFile(const std::string &name)
GetDeviceFile.
Definition: config.cpp:425
const unsigned int GetCmdTout()
GetCmdTout.
Definition: config.cpp:440
void SetCmdTout(const unsigned int cmd_tout)
SetCmdTout.
Definition: config.cpp:495