OpenRTM-aist
1.2.1
|
Manager configuration class. More...
#include <ManagerConfig.h>
Public Member Functions | |
ManagerConfig () | |
Constructor. More... | |
ManagerConfig (int argc, char **argv) | |
Constructor. More... | |
virtual | ~ManagerConfig (void) |
Destructor. More... | |
void | init (int argc, char **argv) |
Initialization. More... | |
void | configure (coil::Properties &prop) |
Specify the configuration information to the Property. More... | |
coil::Properties | getConfig () const |
Get the configuration. More... | |
Static Public Attributes | |
static const char * | config_file_path [] |
The default configuration file path for manager. More... | |
static const char * | config_file_env |
The environment variable to distinguish the default configuration file path. More... | |
Protected Member Functions | |
void | parseArgs (int argc, char **argv) |
Parse the command arguments. More... | |
bool | findConfigFile () |
Find the configuration file. More... | |
void | setSystemInformation (coil::Properties &prop) |
Set system information. More... | |
bool | fileExist (const std::string &filename) |
Check the file existence. More... | |
Protected Attributes | |
coil::Properties | m_argprop |
configuration properties from arguments More... | |
std::string | m_configFile |
Manager's configuration file path. More... | |
bool | m_isMaster |
Manager master flag. More... | |
Manager configuration class.
Modify Manager's configuration. This class receives the command line arguments and will be instantiated. Set property information of Manager with the configuration file specified by the command line argument or the environment variable etc.
The priorities of each configuration are as follows:
RTC::ManagerConfig::ManagerConfig | ( | ) |
Constructor.
Constructor (Do nothing)
RTC::ManagerConfig::ManagerConfig | ( | int | argc, |
char ** | argv | ||
) |
Constructor.
Initialize configuration information by given arguments.
argc | Number of command line arguments |
argv | The command line arguments |
|
virtual |
Destructor.
void RTC::ManagerConfig::configure | ( | coil::Properties & | prop | ) |
Specify the configuration information to the Property.
Configure to the properties specified by Manager's configuration
prop | The target properties to configure |
|
protected |
Check the file existence.
Confirm whether the specified file exists
filename | The target confirmation file |
|
protected |
Find the configuration file.
Find the configuration file and configure it. Confirm the file existence when the configuration file has already configured.
The priority of the configuration file
The command option>the environment variable>the default file> the default configuration
Default force option(-d): Ignore any default files and use the default configuration.
coil::Properties RTC::ManagerConfig::getConfig | ( | ) | const |
Get the configuration.
Get the configuration. When this operation is called before calling init() function, return the default configuration statically defined, When this operation is called after calling init() function, return the initialized configuration according to the command line arguments, the environment variables etc. (Not implemented)
void RTC::ManagerConfig::init | ( | int | argc, |
char ** | argv | ||
) |
Initialization.
Initialize with command line options. The following command options are available.
argc | Number of command line arguments |
argv | The command line arguments |
|
protected |
Parse the command arguments.
argc | Number of command line arguments |
argv | The command line arguments |
|
protected |
Set system information.
Get the following system info. and set them to Manager's properties.
prop | Properties to set system information |
|
static |
The environment variable to distinguish the default configuration file path.
|
static |
The default configuration file path for manager.
|
protected |
configuration properties from arguments
|
protected |
Manager's configuration file path.
|
protected |
Manager master flag.
true:master,false:slave