OpenRTM-aist-Python 2.0.0
Classes | Public Member Functions | List of all members
OpenRTM_aist.Manager.Manager Class Reference

More...

Classes

class  ECFactoryPredicate
 
class  FactoryPredicate
 
class  Finalized
 
class  InstanceName
 
class  ModulePredicate
 

Public Member Functions

def __init__ (self, _manager=None)
 
def init (*arg)
 
def instance ()
 
def terminate (self)
 
def shutdown (self)
 
def setModuleInitProc (self, proc)
 
def activateManager (self)
 
def runManager (self, no_block=False)
 
def main (self)
 
def join (self)
 
def load (self, fname, initfunc)
 
def unload (self, fname)
 
def unloadAll (self)
 
def getLoadedModules (self)
 
def getLoadableModules (self)
 
def registerFactory (self, profile, new_func, delete_func)
 
def getFactoryProfiles (self)
 
def registerECFactory (self, name, new_func, delete_func)
 
def getModulesFactories (self)
 
def createComponent (self, comp_args)
 
def registerComponent (self, comp)
 
def unregisterComponent (self, comp)
 
def createContext (self, ec_args)
 
def deleteComponent (self, instance_name=None, comp=None)
 
def getComponent (self, instance_name)
 
def getComponents (self)
 
def getORB (self)
 
def getPOA (self)
 
def getPOAManager (self)
 
def initManager (self, argv)
 
def shutdownManagerServant (self)
 
def shutdownManager (self)
 
def shutdownOnNoRtcs (self)
 
def initLogstreamFile (self)
 
def initLogstreamPlugins (self)
 
def initLogstreamOthers (self)
 
def initLogger (self)
 
def shutdownLogger (self)
 
def initORB (self)
 
def createORBOptions (self)
 
def createORBEndpoints (self)
 
def createORBEndpointOption (self, opt, endpoints)
 
def shutdownORB (self)
 
def initNaming (self)
 
def shutdownNaming (self)
 
def initExecContext (self)
 
def initCpuAffinity (self)
 
def initComposite (self)
 
def initFactories (self)
 
def initTimer (self)
 
def shutdownTimer (self)
 
def endpointPropertySwitch (self)
 
def setEndpointProperty (self, objref)
 
def initManagerServant (self)
 
def shutdownComponents (self)
 
def cleanupComponent (self, comp)
 
def cleanupComponents (self)
 
def notifyFinalized (self, comp)
 
def procComponentArgs (self, comp_arg, comp_id, comp_conf)
 bool procComponentArgs(const char* comp_arg, coil::Properties& comp_id, coil::Properties& comp_conf)
 
def configureComponent (self, comp, prop)
 void configureComponent(RTObject_impl* comp, const coil::Properties& prop);
 
def mergeProperty (self, prop, file_name)
 
def formatString (self, naming_format, prop)
 
def getLogbuf (self, name="manager")
 
def getConfig (self)
 
def publishPorts (self, comp)
 
def subscribePorts (self, comp)
 
def getPortsOnNameServers (self, nsname, kind)
 
def connectDataPorts (self, port, target_ports)
 
def connectServicePorts (self, port, target_ports)
 
def initPreConnection (self)
 
def initPreActivation (self)
 
def initPreCreation (self)
 
def invokeInitProc (self)
 
def getManagerServant (self)
 
def getNaming (self)
 
def addTask (self, fn, period)
 
def invoke (self, fn, delay)
 
def removeTask (self, task)
 
def addExecutionContext (self, ec)
 
def removeExecutionContext (self, ec)
 
def createdExecutionContexts (self)
 

Detailed Description

Manager class

Constructor & Destructor Documentation

◆ __init__()

def OpenRTM_aist.Manager.Manager.__init__ (   self,
  _manager = None 
)

Protected Copy Constructor

Member Function Documentation

◆ activateManager()

def OpenRTM_aist.Manager.Manager.activateManager (   self)

Activate Manager

This operation do the following,

  • Activate CORBA POAManager
  • Activate Manager CORBA object
  • Execute the initial procedure call of the Manager

This operationo should be invoked after Manager:init(), and before tunManager().

◆ addExecutionContext()

def OpenRTM_aist.Manager.Manager.addExecutionContext (   self,
  ec 
)

Parameters
self
ecExecution context
Returns

◆ addTask()

def OpenRTM_aist.Manager.Manager.addTask (   self,
  fn,
  period 
)

Add a task to the Manager timer.

This operation add a function or functional object to Manger's timer. It run until removeTask(). DO NOT block (Ex. sleep) in the registerd function.

Parameters
self
fnThe Function run periodically.
periodPeriod of fn execution.
Returns
id ID for removetask().
PeriodicFunction

◆ cleanupComponents()

def OpenRTM_aist.Manager.Manager.cleanupComponents (   self)

This method deletes RT-Components.

This method deletes RT-Components registered by notifyFinalized().

void cleanupComponents();

◆ connectDataPorts()

def OpenRTM_aist.Manager.Manager.connectDataPorts (   self,
  port,
  target_ports 
)

Parameters
self
port
target_portsvoid connectDataPorts(PortService_ptr port,PortServiceList_var& target_ports)

◆ connectServicePorts()

def OpenRTM_aist.Manager.Manager.connectServicePorts (   self,
  port,
  target_ports 
)

Parameters
self
port
target_portsvoid connectServicePorts(PortService_ptr port,PortServiceList_var& target_ports)

◆ createComponent()

def OpenRTM_aist.Manager.Manager.createComponent (   self,
  comp_args 
)

Create RT-Components

Create specified RT-Component's instances via registered Factory. When its instances have been created successfully, the following processings are also executed.

  • Read and set configuration information that was set by external file.
  • Bind ExecutionContext and start operation.
  • Register to naming service.
Parameters
module_nameTarget RT-Component names for the creation
Returns
Created RT-Component's instances

◆ createContext()

def OpenRTM_aist.Manager.Manager.createContext (   self,
  ec_args 
)

Create Context

Returns
Created Context's instances

ExecutionContextBase* createContext(const char* ec_args);

◆ createdExecutionContexts()

def OpenRTM_aist.Manager.Manager.createdExecutionContexts (   self)

Parameters
self
Returns

◆ createORBEndpointOption()

def OpenRTM_aist.Manager.Manager.createORBEndpointOption (   self,
  opt,
  endpoints 
)

Create a command optional line of Endpoint of ORB.

Parameters
optORB options
endpointsEndpoints list

void createORBEndpointOption(std::string& opt, coil::vstring& endpoints);

◆ createORBEndpoints()

def OpenRTM_aist.Manager.Manager.createORBEndpoints (   self)

Create Endpoints

Create Endpoints from the configuration.

Parameters
endpointsEndpoints list

void createORBEndpoints(coil::vstring& endpoints);

◆ createORBOptions()

def OpenRTM_aist.Manager.Manager.createORBOptions (   self)

ORB command option creation

◆ deleteComponent()

def OpenRTM_aist.Manager.Manager.deleteComponent (   self,
  instance_name = None,
  comp = None 
)

Unregister RT-Component that is registered in the Manager

◆ endpointPropertySwitch()

def OpenRTM_aist.Manager.Manager.endpointPropertySwitch (   self)

ManagerServant initialization

Getting corba.endpoint_property value and return them as a tuple. This function obtains corbaendpoint_property that specifies if IPv4/IPv6 addresses and IP address numbes to be published, and it returnes them as tuple.

Returns
(ipv4, ipv4_list, ipv6, ipv6_list) endpoint_property value ipv4, ipv6: A True/False flag whether to use IPv4 / IPv6 address ipv4_list, ipv6_list: List of valid address number, empty means valid all addresses

◆ getComponent()

def OpenRTM_aist.Manager.Manager.getComponent (   self,
  instance_name 
)

Get RT-Component's pointer

◆ getComponents()

def OpenRTM_aist.Manager.Manager.getComponents (   self)

Get all RT-Component's pointer

◆ getFactoryProfiles()

def OpenRTM_aist.Manager.Manager.getFactoryProfiles (   self)

Get profiles of factories.

Get profiles of factories.

Returns
profiles of factories

◆ getLoadableModules()

def OpenRTM_aist.Manager.Manager.getLoadableModules (   self)

Get loadable module names

◆ getLoadedModules()

def OpenRTM_aist.Manager.Manager.getLoadedModules (   self)

Get loaded module names std::vector<coil::Properties> getLoadedModules();

◆ getManagerServant()

def OpenRTM_aist.Manager.Manager.getManagerServant (   self)

Parameters
self
Returns
ManagerServant* getManagerServant()

◆ getModulesFactories()

def OpenRTM_aist.Manager.Manager.getModulesFactories (   self)

Get the list of all RT-Component Factory

◆ getNaming()

def OpenRTM_aist.Manager.Manager.getNaming (   self)

Parameters
self
Returns
NamingManager* getNaming()

◆ getORB()

def OpenRTM_aist.Manager.Manager.getORB (   self)

Get the pointer to the ORB

◆ getPOA()

def OpenRTM_aist.Manager.Manager.getPOA (   self)

Get the pointer to the RootPOA

◆ getPortsOnNameServers()

def OpenRTM_aist.Manager.Manager.getPortsOnNameServers (   self,
  nsname,
  kind 
)

Parameters
self
nsname
kind
Returns

PortServiceList_var getPortsOnNameServers(std::string nsname,std::string kind)

◆ init()

def OpenRTM_aist.Manager.Manager.init ( arg)

Initializa manager

This is the static function to tintialize the Manager. The Manager is initialized by given arguments. At the starting the manager, this static function "must" be called from application program. The manager has two static functions to get the instance, "init()" and "instance()". Since initializing process is only performed by the "init()" function, the "init()" has to be called at the beginning of the lifecycle of the Manager. function.

Parameters
argvThe array of the command line arguments.

◆ initComposite()

def OpenRTM_aist.Manager.Manager.initComposite (   self)

PeriodicECSharedComposite initialization

Returns
PeriodicECSharedComposite initialization result (Successful:true, Failed:false)

◆ initCpuAffinity()

def OpenRTM_aist.Manager.Manager.initCpuAffinity (   self)

Parameters
self

◆ initFactories()

def OpenRTM_aist.Manager.Manager.initFactories (   self)

Factories initialization

Initialize buffer factories, thread factories, publisher factories, provider factories, and consumer factories.

Returns
PeriodicECSharedComposite initialization result (Successful:true, Failed:false)

◆ initLogger()

def OpenRTM_aist.Manager.Manager.initLogger (   self)

System logger initialization

◆ initLogstreamFile()

def OpenRTM_aist.Manager.Manager.initLogstreamFile (   self)

Parameters
self

◆ initLogstreamOthers()

def OpenRTM_aist.Manager.Manager.initLogstreamOthers (   self)

Parameters
self

◆ initLogstreamPlugins()

def OpenRTM_aist.Manager.Manager.initLogstreamPlugins (   self)

Parameters
self

◆ initManager()

def OpenRTM_aist.Manager.Manager.initManager (   self,
  argv 
)

Manager internal initialization

◆ initManagerServant()

def OpenRTM_aist.Manager.Manager.initManagerServant (   self)

ManagerServant initialization

Returns
Timer Initialization result (Successful:true, Failed:false)

◆ initORB()

def OpenRTM_aist.Manager.Manager.initORB (   self)

CORBA ORB initialization

◆ initPreActivation()

def OpenRTM_aist.Manager.Manager.initPreActivation (   self)

Parameters
selfvoid initPreActivation()

◆ initPreConnection()

def OpenRTM_aist.Manager.Manager.initPreConnection (   self)

Parameters
selfvoid initPreConnection()

◆ initPreCreation()

def OpenRTM_aist.Manager.Manager.initPreCreation (   self)

Parameters
selfvoid initPreCreation()

◆ instance()

def OpenRTM_aist.Manager.Manager.instance ( )

Get instance of the manager

This is the static function to get the instance of the Manager. Before calling this function, ensure that the initialization function "init()" is called.

Returns
The only instance reference of the manager

◆ invoke()

def OpenRTM_aist.Manager.Manager.invoke (   self,
  fn,
  delay 
)

Run a function on the Manager main thread.

The specified function run on the Manager main thread. DO NOT block the thread in the function.

Parameters
self
fnThe Function run on the Manager main thread.
delayThe delay time for the function execution.
Returns
DelayedFunction

◆ invokeInitProc()

def OpenRTM_aist.Manager.Manager.invokeInitProc (   self)

Parameters
selfvoid invokeInitProc()

◆ join()

def OpenRTM_aist.Manager.Manager.join (   self)

Wait for Manager's termination

Parameters
self

◆ load()

def OpenRTM_aist.Manager.Manager.load (   self,
  fname,
  initfunc 
)

[CORBA interface] Load module

Load module (shared library, DLL etc..) by file name, and invoke initialize function.

Parameters
fnameThe module file name
initfuncThe initialize function name
Returns
Return code RTC::RTC_OK Normal return RTC::RTC_ERROR Load failed, or unknown error RTC::PRECONDITION_NOT_MET Not allowed operation by conf RTC::BAD_PARAMETER Invalid parameter

◆ main()

def OpenRTM_aist.Manager.Manager.main (   self)

The main function of the Manager main thread.

Parameters
self

◆ notifyFinalized()

def OpenRTM_aist.Manager.Manager.notifyFinalized (   self,
  comp 
)

This method deletes RT-Components.

The deleted RT-Component is registered. The registered RT-Components are deleted by cleanupComponents().

Parameters
DeletedRT component

void notifyFinalized(RTObject_impl* comp);

◆ publishPorts()

def OpenRTM_aist.Manager.Manager.publishPorts (   self,
  comp 
)

Parameters
self
comp

void publishPorts(RTObject_impl* comp)

◆ registerComponent()

def OpenRTM_aist.Manager.Manager.registerComponent (   self,
  comp 
)

Register RT-Component directly without Factory

◆ registerECFactory()

def OpenRTM_aist.Manager.Manager.registerECFactory (   self,
  name,
  new_func,
  delete_func 
)

Register ExecutionContext Factory

◆ registerFactory()

def OpenRTM_aist.Manager.Manager.registerFactory (   self,
  profile,
  new_func,
  delete_func 
)

Register RT-Component Factory

◆ removeExecutionContext()

def OpenRTM_aist.Manager.Manager.removeExecutionContext (   self,
  ec 
)

Parameters
self
ecExecution context
Returns

◆ removeTask()

def OpenRTM_aist.Manager.Manager.removeTask (   self,
  task 
)

Remove the task from the Manager timer.

This operation remove the specify function.

Parameters
self
idTask ID

◆ runManager()

def OpenRTM_aist.Manager.Manager.runManager (   self,
  no_block = False 
)

Run the Manager

This operation processes the main event loop of the Manager. In this main loop, CORBA's ORB event loop or other processes are performed. As the default behavior, this operation is going to blocking mode and never returns until manager::destroy() is called. When the given argument "no_block" is set to "true", this operation creates a thread to process the event loop internally, and it doesn't block and returns.

Parameters
no_blockfalse: Blocking mode, true: non-blocking mode.

◆ setEndpointProperty()

def OpenRTM_aist.Manager.Manager.setEndpointProperty (   self,
  objref 
)

Setting endpoint information to property

This function sets endpoint information to corba.endpoints property. It extract endpoint information (list of IP address, port number) from given object reference, and set them to corba.endpoints, corba.endpoints_ipv4, corba.endpoints_ipv6

Parameters
objrefA object reference

◆ setModuleInitProc()

def OpenRTM_aist.Manager.Manager.setModuleInitProc (   self,
  proc 
)

Run the Manager

This operation sets the initial procedure call to process module initialization, other user defined initialization and so on. The given procedure will be called at the proper timing after the manager initialization, activation and run.

Parameters
procA function pointer to the initial procedure call

◆ shutdownLogger()

def OpenRTM_aist.Manager.Manager.shutdownLogger (   self)

System Logger finalization

◆ shutdownOnNoRtcs()

def OpenRTM_aist.Manager.Manager.shutdownOnNoRtcs (   self)

Shutdown Manager

This method shutdowns Manager as follows.

  • "Manager.shutdown_on_nortcs" of configuration is YES.
  • The component is not registered.

void shutdownOnNoRtcs();

◆ shutdownORB()

def OpenRTM_aist.Manager.Manager.shutdownORB (   self)

ORB finalization

◆ subscribePorts()

def OpenRTM_aist.Manager.Manager.subscribePorts (   self,
  comp 
)

Parameters
self
comp

void subscribePorts(RTObject_impl* comp)

◆ unload()

def OpenRTM_aist.Manager.Manager.unload (   self,
  fname 
)

Unload module

Unload shared library.

Parameters
pathnameModule file name

◆ unloadAll()

def OpenRTM_aist.Manager.Manager.unloadAll (   self)

Unload module

Unload all loaded shared library.

◆ unregisterComponent()

def OpenRTM_aist.Manager.Manager.unregisterComponent (   self,
  comp 
)

Register RT-Component directly without Factory


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