ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
This class provide access to the command line options and the configuration parameters stored in the configuration file. More...
#include <config.hpp>
Public Member Functions | |
Config () | |
Default constructor. More... | |
virtual | ~Config () |
Default destructor. More... | |
bool | ParseOptions (int argc, char *argv[]) |
This method parses the command line parameters overriding the initialization done in the constructor. More... | |
void | LoadConfig (const std::string &filename="") |
This method load from a configuration file the application configuration overriding the initialization done in the constructor and the command line options. More... | |
const std::string & | GetMsgReplierEndpoint () const |
const std::string & | GetPubEndpoint () const |
const std::string & | GetDbEndpoint () const |
const std::string & | GetDbPrefix () const |
const timeval | GetDbTimeout () const |
const std::string & | GetSmScxmlFilename () const |
const std::string & | GetConfigFilename () const |
const std::string & | GetProcName () const |
const std::string & | GetLogLevel () const |
const std::string & | GetLogProperties () const |
std::filesystem::path | GetWorkspace () const |
daq::DpmClientParams const & | GetDpmClientParams () const |
Config (const Config &)=delete | |
Config & | operator= (const Config &)=delete |
Disable copy constructor. More... | |
Public Attributes | |
YAML::Node | m_config_node |
Disable assignment operator. More... | |
std::string | m_proc_name |
std::string | m_instrument_id |
std::string | m_log_level |
std::string | m_log_properties |
std::string | m_config_filename |
std::string | m_scxml_filename |
std::string | m_db_host_endpoint |
std::string | m_db_prefix |
int | m_db_timeout_sec |
std::string | m_req_endpoint |
std::string | m_pub_endpoint |
std::string | m_out_path |
std::filesystem::path | m_workspace |
daq::DpmClientParams | m_dpm_params |
std::optional< std::chrono::hours > | m_stale_acquiring |
std::optional< std::chrono::hours > | m_stale_merging |
This class provide access to the command line options and the configuration parameters stored in the configuration file.
Definition at line 46 of file config.hpp.
server::Config::Config | ( | ) |
Default constructor.
Initialize application configuration attributes by
Definition at line 27 of file config.cpp.
|
virtual |
Default destructor.
Definition at line 67 of file config.cpp.
|
delete |
const std::string & server::Config::GetConfigFilename | ( | ) | const |
Definition at line 350 of file config.cpp.
const std::string & server::Config::GetDbEndpoint | ( | ) | const |
Definition at line 325 of file config.cpp.
const std::string & server::Config::GetDbPrefix | ( | ) | const |
Definition at line 330 of file config.cpp.
const timeval server::Config::GetDbTimeout | ( | ) | const |
Definition at line 339 of file config.cpp.
daq::DpmClientParams const & server::Config::GetDpmClientParams | ( | ) | const |
Definition at line 370 of file config.cpp.
const std::string & server::Config::GetLogLevel | ( | ) | const |
Definition at line 360 of file config.cpp.
const std::string & server::Config::GetLogProperties | ( | ) | const |
Definition at line 365 of file config.cpp.
const std::string & server::Config::GetMsgReplierEndpoint | ( | ) | const |
Definition at line 315 of file config.cpp.
const std::string & server::Config::GetProcName | ( | ) | const |
Definition at line 355 of file config.cpp.
const std::string & server::Config::GetPubEndpoint | ( | ) | const |
Definition at line 320 of file config.cpp.
const std::string & server::Config::GetSmScxmlFilename | ( | ) | const |
Definition at line 345 of file config.cpp.
|
inline |
Definition at line 138 of file config.hpp.
void server::Config::LoadConfig | ( | const std::string & | filename = "" | ) |
This method load from a configuration file the application configuration overriding the initialization done in the constructor and the command line options.
[in] | filename | Application configuration filename. |
Definition at line 151 of file config.cpp.
bool server::Config::ParseOptions | ( | int | argc, |
char * | argv[] | ||
) |
This method parses the command line parameters overriding the initialization done in the constructor.
[in] | argc | Number of command line options. |
[in] | argv | Pointer to the array of command line options. |
Definition at line 71 of file config.cpp.
std::string server::Config::m_config_filename |
Definition at line 155 of file config.hpp.
YAML::Node server::Config::m_config_node |
Disable assignment operator.
Definition at line 150 of file config.hpp.
std::string server::Config::m_db_host_endpoint |
Definition at line 157 of file config.hpp.
std::string server::Config::m_db_prefix |
Definition at line 158 of file config.hpp.
int server::Config::m_db_timeout_sec |
Definition at line 159 of file config.hpp.
daq::DpmClientParams server::Config::m_dpm_params |
Definition at line 164 of file config.hpp.
std::string server::Config::m_instrument_id |
Definition at line 152 of file config.hpp.
std::string server::Config::m_log_level |
Definition at line 153 of file config.hpp.
std::string server::Config::m_log_properties |
Definition at line 154 of file config.hpp.
std::string server::Config::m_out_path |
Definition at line 162 of file config.hpp.
std::string server::Config::m_proc_name |
Definition at line 151 of file config.hpp.
std::string server::Config::m_pub_endpoint |
Definition at line 161 of file config.hpp.
std::string server::Config::m_req_endpoint |
Definition at line 160 of file config.hpp.
std::string server::Config::m_scxml_filename |
Definition at line 156 of file config.hpp.
std::optional<std::chrono::hours> server::Config::m_stale_acquiring |
Definition at line 165 of file config.hpp.
std::optional<std::chrono::hours> server::Config::m_stale_merging |
Definition at line 166 of file config.hpp.
std::filesystem::path server::Config::m_workspace |
Definition at line 163 of file config.hpp.