|
ifw-sup
1.0.0
|
#include <config.hpp>
Public Member Functions | |
| Config () | |
| virtual | ~Config () |
| bool | ParseOptions (int argc, char *argv[]) |
| void | LoadConfig (const std::string &filename="") |
| const std::string | GetServerId () const |
| const std::string | GetMsgReplierEndpoint () const |
| const std::string | GetMsgPubEndpoint () const override |
| const std::string | GetDbEndpoint () 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 int | GetNumSubsystems () |
| const int | GetNumOpModes () |
| The number of defined operational modes. More... | |
| const std::string | GetSubsysName (const int &subsys_index) |
| Returns a given subsystem name. More... | |
| const std::string | GetSubsysRrEndpoint (const std::string &name) |
| Returs subsystem req/reply endpoint. More... | |
| const std::string | GetSubsysPsEndpoint (const std::string &name) |
| Returs subsystem pub/sub endpoint. More... | |
| const std::string | GetSubsysType (const std::string &name) |
| Returs subsystem type. More... | |
| std::optional< ScopeEnum > | GetSubsysScope (const std::string &name) |
| GetSubsysScope. More... | |
| std::string | GetSubsysScopeStr (const std::string &name) |
| GetSubsysScopeStr. More... | |
| bool | GetSubsysAccess (const std::string &name) |
| GetSubsysAccess. More... | |
| void | SetSubsysAccess (const std::string &name, const bool &access) |
| virtual void | GetConfigList (std::vector< std::string > &cfg_list) |
| Get configuration list. More... | |
| const unsigned int | GetCmdTout () |
| Get the command timeout. More... | |
| const unsigned int | GetWaitTout () |
| Get the wait timeout. More... | |
| void | SetCmdTout (const unsigned int cmd_tout) |
| Set command timeout. More... | |
| void | SetWaitTout (const unsigned int wait_tout) |
| Set wait timeout. More... | |
| const std::string | GetConfigAsString () const |
| Get the actual configuration as a string. More... | |
This class provide access to the command line options and the configuration parameters stored in the configuration file.
| sup::syssup::common::Config::Config | ( | ) |
Default constructor.
Initialize application configuration attributes by
|
virtual |
Default destructor.
|
virtual |
|
virtual |
Get the actual configuration as a string.
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Get configuration list.
| cfg_list | List of all configuration parameters. |
This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
overridevirtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
| const int sup::syssup::common::Config::GetNumOpModes | ( | ) |
The number of defined operational modes.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
Implements sup::syssup::common::IConfig.
|
virtual |
GetSubsysAccess.
| name | Name of the subsystem |
Implements sup::syssup::common::IConfig.
|
virtual |
Returns a given subsystem name.
| subsys_index | Index of the subsystem in the array. |
Implements sup::syssup::common::IConfig.
| const std::string sup::syssup::common::Config::GetSubsysPsEndpoint | ( | const std::string & | name | ) |
Returs subsystem pub/sub endpoint.
| name | Name of the subsystem |
| const std::string sup::syssup::common::Config::GetSubsysRrEndpoint | ( | const std::string & | name | ) |
Returs subsystem req/reply endpoint.
| name | Name of the subsystem |
|
virtual |
GetSubsysScope.
| name | Name of the subsystem |
Implements sup::syssup::common::IConfig.
| std::string sup::syssup::common::Config::GetSubsysScopeStr | ( | const std::string & | name | ) |
GetSubsysScopeStr.
| name |
|
virtual |
Returs subsystem type.
| name | Name of the subsystem |
Implements sup::syssup::common::IConfig.
|
virtual |
|
virtual |
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. |
Implements sup::syssup::common::IConfig.
|
virtual |
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. |
Implements sup::syssup::common::IConfig.
| void sup::syssup::common::Config::SetCmdTout | ( | const unsigned int | cmd_tout | ) |
Set command timeout.
| cmd_tout | new command timeout |
| void sup::syssup::common::Config::SetSubsysAccess | ( | const std::string & | name, |
| const bool & | access | ||
| ) |
| void sup::syssup::common::Config::SetWaitTout | ( | const unsigned int | wait_tout | ) |
Set wait timeout.
| wait_tout | new wait timeout |