OpenRTM-aist-Python 2.0.0
Public Member Functions | Static Public Attributes | List of all members
OpenRTM_aist.ManagerConfig.ManagerConfig Class Reference

More...

Public Member Functions

def __init__ (self, argv=None)
 
def init (self, argv)
 
def configure (self, prop)
 
def parseArgs (self, argv)
 
def findConfigFile (self)
 
def setSystemInformation (self, prop)
 
def fileExist (self, filename)
 

Static Public Attributes

list config_file_path
 
string config_file_env = "RTC_MANAGER_CONFIG"
 

Detailed Description

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:

  1. Command option "-f"
  2. Environment variable "RTC_MANAGER_CONFIG"
  3. Default configuration file "./rtc.conf"
  4. Default configuration file "/etc/rtc.conf"
  5. Default configuration file "/etc/rtc/rtc.conf"
  6. Default configuration file "/usr/local/etc/rtc.conf"
  7. Default configuration file "/usr/local/etc/rtc/rtc.conf"
  8. Embedded configuration value

If the command option "-d" is specified (even if specify configuration file by "-f" option), the embedded configuration values will be used.

Since
0.4.0

Constructor & Destructor Documentation

◆ __init__()

def OpenRTM_aist.ManagerConfig.ManagerConfig.__init__ (   self,
  argv = None 
)

ManagerConfig constructor

The constructor that performs initialization at the same time with given arguments.

Parameters
argvThe command line arguments

Member Function Documentation

◆ configure()

def OpenRTM_aist.ManagerConfig.ManagerConfig.configure (   self,
  prop 
)

Specify the configuration information to the Property

Configure to the properties specified by Manager's configuration

◆ fileExist()

def OpenRTM_aist.ManagerConfig.ManagerConfig.fileExist (   self,
  filename 
)

Check the file existence

Confirm whether the specified file exists

Parameters
filenameThe target confirmation file
Returns
file existance confirmation (True if the file exists.)

◆ findConfigFile()

def OpenRTM_aist.ManagerConfig.ManagerConfig.findConfigFile (   self)

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.

Returns
Configuration file search result

◆ init()

def OpenRTM_aist.ManagerConfig.ManagerConfig.init (   self,
  argv 
)

Initialization

Initialize with command line options. The following command options are available.

-a : Disable Manager service
-f file : Specify a configuration file.
-l module : Specify modules to be loaded at the beginning.
-o options: Other options.
-p : Specify a port number.
-d : Run Master Manager.

◆ parseArgs()

def OpenRTM_aist.ManagerConfig.ManagerConfig.parseArgs (   self,
  argv 
)

Get configuration value.

This operation returns default configuration statically defined, when before calling init() function. When after calling init() function, this operation returns initialized configuration value according to command option, environment value and so on.

def getConfig(self): pass

Parse command arguments

-a : Disable Manager service
-f file : Specify a configuration file.
-l module : Specify modules to be loaded at the beginning.
-o options: Other options.
-p : Specify a port number.
-d : Run Master Manager.

◆ setSystemInformation()

def OpenRTM_aist.ManagerConfig.ManagerConfig.setSystemInformation (   self,
  prop 
)

Set system information

Get the following system info and set them to Manager's properties.

  • os.name : OS name
  • os.release : OS release name
  • os.version : OS version
  • os.arch : OS architecture
  • os.hostname: Hostname
  • manager.pid: process ID

Member Data Documentation

◆ config_file_env

string OpenRTM_aist.ManagerConfig.ManagerConfig.config_file_env = "RTC_MANAGER_CONFIG"
static

The environment variable to distinguish the default configuration file path

◆ config_file_path

list OpenRTM_aist.ManagerConfig.ManagerConfig.config_file_path
static
Initial value:
= ["./rtc.conf",
"${PROGRAMDATA}/OpenRTM-aist/rtc.conf"]

The default configuration file path for manager


The documentation for this class was generated from the following file: