ifw-daq
3.0.0-pre2
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... | |
Config (const Config &)=delete | |
Config & | operator= (const Config &)=delete |
Disable copy constructor. More... | |
bool | ParseOptions (int argc, char *argv[]) |
Disable assignment operator. 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 & | GetDbPrefix () const |
std::chrono::seconds | 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::config::Manager & | GetMgr () |
daq::DpmClientParams const & | GetDpmClientParams () const |
Public Attributes | |
daq::config::Manager | m_mgr |
std::optional< elt::configng::CiiConfigDocument > | m_config |
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_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::chrono::hours | m_stale_acquiring = std::chrono::hours(14) |
std::chrono::hours | m_stale_merging = std::chrono::hours(2 * 24) |
This class provide access to the command line options and the configuration parameters stored in the configuration file.
Definition at line 60 of file config.hpp.
server::Config::Config | ( | ) |
Default constructor.
Initialize application configuration attributes by
Definition at line 39 of file config.cpp.
|
delete |
const std::string & server::Config::GetConfigFilename | ( | ) | const |
Definition at line 317 of file config.cpp.
const std::string & server::Config::GetDbPrefix | ( | ) | const |
Definition at line 299 of file config.cpp.
std::chrono::seconds server::Config::GetDbTimeout | ( | ) | const |
Definition at line 308 of file config.cpp.
daq::DpmClientParams const & server::Config::GetDpmClientParams | ( | ) | const |
Definition at line 337 of file config.cpp.
const std::string & server::Config::GetLogLevel | ( | ) | const |
Definition at line 327 of file config.cpp.
const std::string & server::Config::GetLogProperties | ( | ) | const |
Definition at line 332 of file config.cpp.
|
inline |
Definition at line 151 of file config.hpp.
const std::string & server::Config::GetMsgReplierEndpoint | ( | ) | const |
Definition at line 289 of file config.cpp.
const std::string & server::Config::GetProcName | ( | ) | const |
Definition at line 322 of file config.cpp.
const std::string & server::Config::GetPubEndpoint | ( | ) | const |
Definition at line 294 of file config.cpp.
const std::string & server::Config::GetSmScxmlFilename | ( | ) | const |
Definition at line 312 of file config.cpp.
|
inline |
Definition at line 145 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 166 of file config.cpp.
bool server::Config::ParseOptions | ( | int | argc, |
char * | argv[] | ||
) |
Disable assignment operator.
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 90 of file config.cpp.
std::optional<elt::configng::CiiConfigDocument> server::Config::m_config |
Definition at line 159 of file config.hpp.
std::string server::Config::m_config_filename |
Definition at line 165 of file config.hpp.
std::string server::Config::m_db_prefix |
Definition at line 167 of file config.hpp.
int server::Config::m_db_timeout_sec |
Definition at line 168 of file config.hpp.
daq::DpmClientParams server::Config::m_dpm_params |
Definition at line 173 of file config.hpp.
std::string server::Config::m_instrument_id |
Definition at line 162 of file config.hpp.
std::string server::Config::m_log_level |
Definition at line 163 of file config.hpp.
std::string server::Config::m_log_properties |
Definition at line 164 of file config.hpp.
daq::config::Manager server::Config::m_mgr |
Definition at line 156 of file config.hpp.
std::string server::Config::m_out_path |
Definition at line 171 of file config.hpp.
std::string server::Config::m_proc_name |
Definition at line 161 of file config.hpp.
std::string server::Config::m_pub_endpoint |
Definition at line 170 of file config.hpp.
std::string server::Config::m_req_endpoint |
Definition at line 169 of file config.hpp.
std::string server::Config::m_scxml_filename |
Definition at line 166 of file config.hpp.
std::chrono::hours server::Config::m_stale_acquiring = std::chrono::hours(14) |
Definition at line 174 of file config.hpp.
std::chrono::hours server::Config::m_stale_merging = std::chrono::hours(2 * 24) |
Definition at line 175 of file config.hpp.
std::filesystem::path server::Config::m_workspace |
Definition at line 172 of file config.hpp.