Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RTC::Manager Class Reference

#include <Manager.h>

List of all members.

Public Member Functions

void terminate ()
void shutdown ()
void join ()
LogbufgetLogbuf ()
PropertiesgetConfig ()
void setModuleInitProc (ModuleInitProc proc)
 Run the Manager.
bool activateManager ()
 Activate Manager.
void runManager (bool no_block=false)
 Run the Manager.
void load (const char *fname, const char *initfunc)
 [CORBA interface] Load module
void unload (const char *fname)
 Unload module.
void unloadAll ()
 Unload module.
std::vector< std::string > getLoadedModules ()
 Get loaded module names.
std::vector< std::string > getLoadableModules ()
 Get loadable module names.
bool registerFactory (Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
 Register RT-Component Factory.
bool registerECFactory (const char *name, ECNewFunc new_func, ECDeleteFunc delete_func)
std::vector< std::string > getModulesFactories ()
 Get the list of all RT-Component Factory.
RtcBasecreateComponent (const char *module_name)
 Create RT-Component.
void cleanupComponent (RtcBase *comp)
bool registerComponent (RtcBase *comp)
 Register RT-Component directly without Factory.
bool unregisterComponent (RtcBase *comp)
bool bindExecutionContext (RtcBase *comp)
void deleteComponent (const char *instance_name)
 Unregister RT-Component that is registered in the Manager.
RtcBasegetComponent (const char *instance_name)
 Get RT-Component's pointer.
std::vector< RtcBase * > getComponents ()
 Get all RT-Component's pointer.
CORBA::ORB_ptr getORB ()
 Get the pointer to the ORB.
PortableServer::POA_ptr getPOA ()
 Get the pointer to the RootPOA.
PortableServer::POAManager_ptr getPOAManager ()

Static Public Member Functions

static Managerinit (int argc, char **argv)
 Initializa manager.
static Managerinstance ()
 Get instance of the manager.

Protected Types

typedef ObjectManager< std::string,
RtcBase, InstanceName
ComponentManager
typedef ObjectManager< const
char *, FactoryBase, FactoryPredicate
FactoryManager
 The ComponentFactory.
typedef ObjectManager< const
char *, ECFactoryBase, ECFactoryPredicate
ECFactoryManager

Protected Member Functions

 Manager ()
 Protected Constructor.
 Manager (const Manager &manager)
 Protected Copy Constructor.
void initManager (int argc, char **argv)
 Manager internal initialization.
void shutdownManager ()
 Manager internal finalization.
bool initLogger ()
 System logger initialization.
void shutdownLogger ()
 System Logger finalization.
bool initORB ()
 CORBA ORB initialization.
std::string createORBOptions ()
 ORB command option creation.
void shutdownORB ()
 ORB finalization.
bool initNaming ()
 NamingManager initialization.
void shutdownNaming ()
void shutdownComponents ()
void configureComponent (RtcBase *comp)
bool initExecContext ()
bool initTimer ()
bool mergeProperty (Properties &prop, const char *file_name)
std::string formatString (const char *naming_format, Properties &prop)

Protected Attributes

CORBA::ORB_var m_pORB
 The pointer to the ORB.
PortableServer::POA_var m_pPOA
 The pointer to the POA.
PortableServer::POAManager_var m_pPOAManager
 The pointer to the POAManager.
ModuleInitProc m_initProc
 User's initialization function's pointer.
Properties m_config
 Managaer's configuration Properties.
ModuleManagerm_module
 The pointer to the ModuleManager.
NamingManagerm_namingManager
 The pointer to the ModuleManager.
CorbaObjectManagerm_objManager
Timer * m_timer
 Timer Object.
Logbuf m_Logbuf
 Logger buffer.
MedLogbuf m_MedLogbuf
 Logger mediation buffer.
LogStream rtcout
 Logger stream.
ComponentManager m_compManager
 The ComponentManager.
FactoryManager m_factory
 The ComponentManager.
ECFactoryManager m_ecfactory
std::vector< ExecutionContextBase * > m_ecs
OrbRunnerm_runner
Terminatorm_terminator
Term m_terminate

Static Protected Attributes

static Managermanager
 The pointer to the Manager.
static ACE_Thread_Mutex mutex
 The mutex of the pointer to the Manager.

Classes

struct  ECFactoryPredicate
struct  FactoryPredicate
struct  InstanceName
struct  ModuleFactories
class  OrbRunner
struct  Term
class  Terminator


Member Typedef Documentation

typedef ObjectManager<std::string, RtcBase, InstanceName> RTC::Manager::ComponentManager [protected]
 

typedef ObjectManager<const char*, ECFactoryBase, ECFactoryPredicate> RTC::Manager::ECFactoryManager [protected]
 

typedef ObjectManager<const char*, FactoryBase, FactoryPredicate> RTC::Manager::FactoryManager [protected]
 

The ComponentFactory.


Constructor & Destructor Documentation

RTC::Manager::Manager  )  [protected]
 

Protected Constructor.

RTC::Manager::Manager const Manager manager  )  [protected]
 

Protected Copy Constructor.


Member Function Documentation

bool RTC::Manager::activateManager  ) 
 

Activate Manager.

This operation do the following,

  • Activate CORBA POAManager
  • Activate Manager CORBA object
  • Bind object reference of the Manager to the nameserver

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

bool RTC::Manager::bindExecutionContext RtcBase comp  ) 
 

void RTC::Manager::cleanupComponent RtcBase comp  ) 
 

void RTC::Manager::configureComponent RtcBase comp  )  [protected]
 

RtcBase* RTC::Manager::createComponent const char *  module_name  ) 
 

Create RT-Component.

std::string RTC::Manager::createORBOptions  )  [protected]
 

ORB command option creation.

void RTC::Manager::deleteComponent const char *  instance_name  ) 
 

Unregister RT-Component that is registered in the Manager.

std::string RTC::Manager::formatString const char *  naming_format,
Properties prop
[protected]
 

RtcBase* RTC::Manager::getComponent const char *  instance_name  ) 
 

Get RT-Component's pointer.

std::vector<RtcBase*> RTC::Manager::getComponents  ) 
 

Get all RT-Component's pointer.

Properties& RTC::Manager::getConfig  )  [inline]
 

std::vector<std::string> RTC::Manager::getLoadableModules  ) 
 

Get loadable module names.

std::vector<std::string> RTC::Manager::getLoadedModules  ) 
 

Get loaded module names.

Logbuf& RTC::Manager::getLogbuf  )  [inline]
 

std::vector<std::string> RTC::Manager::getModulesFactories  ) 
 

Get the list of all RT-Component Factory.

CORBA::ORB_ptr RTC::Manager::getORB  ) 
 

Get the pointer to the ORB.

PortableServer::POA_ptr RTC::Manager::getPOA  ) 
 

Get the pointer to the RootPOA.

PortableServer::POAManager_ptr RTC::Manager::getPOAManager  ) 
 

static Manager* RTC::Manager::init int  argc,
char **  argv
[static]
 

Initializa manager.

This is the static member function to tintialize the Manager. The Manager is initialized by given arguments. At the starting the manager, this static member 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:
argc The number of command line argument.
argv The array of the command line arguments.

bool RTC::Manager::initExecContext  )  [protected]
 

bool RTC::Manager::initLogger  )  [protected]
 

System logger initialization.

void RTC::Manager::initManager int  argc,
char **  argv
[protected]
 

Manager internal initialization.

bool RTC::Manager::initNaming  )  [protected]
 

NamingManager initialization.

bool RTC::Manager::initORB  )  [protected]
 

CORBA ORB initialization.

bool RTC::Manager::initTimer  )  [protected]
 

static Manager& RTC::Manager::instance  )  [static]
 

Get instance of the manager.

This is the static member 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

void RTC::Manager::join  ) 
 

void RTC::Manager::load const char *  fname,
const char *  initfunc
 

[CORBA interface] Load module

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

Parameters:
fname The module file name
initfunc The initialize function name

bool RTC::Manager::mergeProperty Properties prop,
const char *  file_name
[protected]
 

bool RTC::Manager::registerComponent RtcBase comp  ) 
 

Register RT-Component directly without Factory.

bool RTC::Manager::registerECFactory const char *  name,
ECNewFunc  new_func,
ECDeleteFunc  delete_func
 

bool RTC::Manager::registerFactory Properties profile,
RtcNewFunc  new_func,
RtcDeleteFunc  delete_func
 

Register RT-Component Factory.

void RTC::Manager::runManager bool  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_block false: Blocking mode, true: non-blocking mode.

void RTC::Manager::setModuleInitProc ModuleInitProc  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:
proc A function pointer to the initial procedure call

void RTC::Manager::shutdown  ) 
 

void RTC::Manager::shutdownComponents  )  [protected]
 

void RTC::Manager::shutdownLogger  )  [protected]
 

System Logger finalization.

void RTC::Manager::shutdownManager  )  [protected]
 

Manager internal finalization.

void RTC::Manager::shutdownNaming  )  [protected]
 

void RTC::Manager::shutdownORB  )  [protected]
 

ORB finalization.

void RTC::Manager::terminate  ) 
 

void RTC::Manager::unload const char *  fname  ) 
 

Unload module.

Unload shared library.

Parameters:
pathname Module file name

void RTC::Manager::unloadAll  ) 
 

Unload module.

Unload all loaded shared library.

bool RTC::Manager::unregisterComponent RtcBase comp  ) 
 


Member Data Documentation

ComponentManager RTC::Manager::m_compManager [protected]
 

The ComponentManager.

Properties RTC::Manager::m_config [protected]
 

Managaer's configuration Properties.

ECFactoryManager RTC::Manager::m_ecfactory [protected]
 

std::vector<ExecutionContextBase*> RTC::Manager::m_ecs [protected]
 

FactoryManager RTC::Manager::m_factory [protected]
 

The ComponentManager.

ModuleInitProc RTC::Manager::m_initProc [protected]
 

User's initialization function's pointer.

Logbuf RTC::Manager::m_Logbuf [protected]
 

Logger buffer.

MedLogbuf RTC::Manager::m_MedLogbuf [protected]
 

Logger mediation buffer.

ModuleManager* RTC::Manager::m_module [protected]
 

The pointer to the ModuleManager.

NamingManager* RTC::Manager::m_namingManager [protected]
 

The pointer to the ModuleManager.

CorbaObjectManager* RTC::Manager::m_objManager [protected]
 

CORBA::ORB_var RTC::Manager::m_pORB [protected]
 

The pointer to the ORB.

PortableServer::POA_var RTC::Manager::m_pPOA [protected]
 

The pointer to the POA.

PortableServer::POAManager_var RTC::Manager::m_pPOAManager [protected]
 

The pointer to the POAManager.

OrbRunner* RTC::Manager::m_runner [protected]
 

Term RTC::Manager::m_terminate [protected]
 

Terminator* RTC::Manager::m_terminator [protected]
 

Timer* RTC::Manager::m_timer [protected]
 

Timer Object.

Manager* RTC::Manager::manager [static, protected]
 

The pointer to the Manager.

ACE_Thread_Mutex RTC::Manager::mutex [static, protected]
 

The mutex of the pointer to the Manager.

LogStream RTC::Manager::rtcout [protected]
 

Logger stream.


The documentation for this class was generated from the following file:
Generated on Fri Oct 5 05:16:03 2007 for OpenRTM by  doxygen 1.4.1