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 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 > Manager::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.
std::vector< std::string > getModulesFactories ()
 Get the list of all RT-Component Factory.
RtcBasecreateComponent (const char *module_name)
 Create RT-Component.
bool registerComponent (RtcBase *comp)
 Register RT-Component directly without Factory.
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.

Protected Member Functions

 Manager ()
 Manager (const Manager &manager)
void initManager (int argc, char **argv)
 Manager internal initialization.
bool initORB ()
 CORBA ORB initialization.
bool initNaming ()
 NamingManager initialization.
bool initLogger ()
 System logger initialization.
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
Propertiesm_config
 The pointer to the Property.
ModuleManagerm_module
 The pointer to the ModuleManager.
NamingManagerm_namingManager
 The pointer to the ModuleManager.
CorbaObjectManagerm_objManager
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.
OrbRunnerm_runner

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  FactoryPredicate
struct  InstanceName
struct  ModuleFactories
class  OrbRunner


Member Typedef Documentation

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

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

The ComponentFactory.


Constructor & Destructor Documentation

RTC::Manager::Manager  )  [protected]
 

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


Member Function Documentation

bool RTC::Manager::activateManager  ) 
 

Activate Manager.

This operation do the following,

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

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

Create RT-Component.

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.

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

Get loadable module names.

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::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.

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::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

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

Get loaded module names.

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::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::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.


Member Data Documentation

ComponentManager RTC::Manager::m_compManager [protected]
 

The ComponentManager.

Properties* RTC::Manager::m_config [protected]
 

The pointer to the Property.

FactoryManager RTC::Manager::m_factory [protected]
 

The ComponentManager.

ModuleInitProc RTC::Manager::m_initProc [protected]
 

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]
 

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 Mon Jan 15 12:15:38 2007 for OpenRTM by  doxygen 1.4.1