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

RTM::RtcManager Class Reference

RTComponent manager class. More...

#include <RtcManager.h>

List of all members.

Public Types

typedef bool(* RtcComponentInit )(RtcManager *manager)
 Component module initialization function.

typedef OutPortAny< TimedString > LogOutPort

Public Member Functions

 RtcManager (int argc, char **argv)
 A constructor of Rtcmanager class.

void shutdown ()
virtual ~RtcManager ()
 A destructor of Rtcmanager class.

int open (void *args)
 Start manager task.

int svc (void)
 Thread function of service.

int close (unsigned long flags)
virtual RtmRes load (const char *pathname, const char *initfunc)
 [CORBA interface] Load module

virtual RtmRes unload (const char *pathname)
 [CORBA interface] Unload module

virtual RTCBase_ptr create_component (const char *module_name, const char *category_name, CORBA::String_out instance_name)
 [CORBA interface] Create component instance

virtual RtmRes delete_component (const char *instance_name, const char *category_name)
 [CORBA interface] Delete component instance

virtual RTCFactoryList * factory_list ()
 [CORBA interface] Get component factory list

virtual RTCBaseList * component_list ()
 [CORBA interface] Get component list

virtual RtmRes command (const char *cmd, CORBA::String_out ret)
 [CORBA interface] Simple interpreter

void initManager ()
 Initialize manager.

void runManager ()
 Run manager.

void runManagerNoBlocking ()
 Run manager (No blocking mode).

bool activateManager ()
 Activate manager servant.

void initModuleProc (RtcModuleInitProc proc)
 Invoke module initialize routine.

bool createCommand (string cmd, boost::function2< bool, vector< string > &, vector< string > & > func)
 Register simple interpreter command function.

bool registerComponent (RtcModuleProfile &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
 Register component factory.

bool registerComponent (RtcFactoryBase *factory)
 Register component factory.

RtcBasecreateComponent (const string &module_name, const string &category_name, string &comp_name)
 Create component.

RtcBasecreateComponent (const string &module_name, const string &category_name)
 Create component.

void cleanupComponent (const string &instance_name, const string &category_name)
 Creanup component.

std::vector< RTCBase_ptr > findComponents (const string &comp_name)
 find component

std::string bindInOut (RTCBase_ptr comp_in, const std::string &inp_name, RTCBase_ptr comp_out, const std::string &outp_name, RTM::SubscriptionType sub_type=RTM::OPS_NEW)
 Bind InPort with OutPort.

std::string bindInOutByName (const std::string &comp_name_in, const std::string &inp_name, const std::string &comp_name_out, const std::string &outp_name, RTM::SubscriptionType sub_type=RTM::OPS_NEW)
 Bind InPort with OutPort by name.

CORBA::ORB_var getORB ()
 Get pointer to ORB.

PortableServer::POA_var getPOA ()
 Get pointer to POA.

RtcLogbufgetLogbuf ()
RtcConfiggetConfig ()
bool loadCmd (const vector< string > &cmd, vector< string > &retval)
bool unloadCmd (const vector< string > &cmd, vector< string > &retval)
bool createComponentCmd (const vector< string > &cmd, vector< string > &retval)
bool listComponent (const vector< string > &cmd, vector< string > &retval)
bool listModule (const vector< string > &cmd, vector< string > &retval)
bool commandListCmd (const vector< string > &cmd, vector< string > &retval)

Public Attributes

ComponentMap m_Components
 Component instance database map.

string m_ManagerName
 Manager name.

RtcLogbuf m_Logbuf
 Logger buffer.

RtcMedLogbuf m_MedLogbuf
 Logger mediation buffer.

RtcLogStream rtcout
 Logger stream.

TimedString m_LoggerOut
LogOutPortm_pLoggerOutPort
LogEmitterm_pLogEmitter
RTCBase_var m_pMasterLogger


Detailed Description

RTComponent manager class.

RtcManager manages life cycle of RTComponent for example, loading component library, creating component, deleting component etc. This manager also provide some services for RTComponents.


Member Typedef Documentation

typedef OutPortAny<TimedString> RTM::RtcManager::LogOutPort
 

typedef bool(* RTM::RtcManager::RtcComponentInit)(RtcManager* manager)
 

Component module initialization function.


Constructor & Destructor Documentation

RTM::RtcManager::RtcManager int  argc,
char **  argv
 

A constructor of Rtcmanager class.

Usually constructor is given command line arguments.

virtual RTM::RtcManager::~RtcManager  )  [virtual]
 

A destructor of Rtcmanager class.


Member Function Documentation

bool RTM::RtcManager::activateManager  ) 
 

Activate manager servant.

std::string RTM::RtcManager::bindInOut RTCBase_ptr  comp_in,
const std::string &  inp_name,
RTCBase_ptr  comp_out,
const std::string &  outp_name,
RTM::SubscriptionType  sub_type = RTM::OPS_NEW
 

Bind InPort with OutPort.

std::string RTM::RtcManager::bindInOutByName const std::string &  comp_name_in,
const std::string &  inp_name,
const std::string &  comp_name_out,
const std::string &  outp_name,
RTM::SubscriptionType  sub_type = RTM::OPS_NEW
 

Bind InPort with OutPort by name.

void RTM::RtcManager::cleanupComponent const string &  instance_name,
const string &  category_name
 

Creanup component.

int RTM::RtcManager::close unsigned long  flags  ) 
 

virtual RtmRes RTM::RtcManager::command const char *  cmd,
CORBA::String_out  ret
[virtual]
 

[CORBA interface] Simple interpreter

Execute simple interpreter.

bool RTM::RtcManager::commandListCmd const vector< string > &  cmd,
vector< string > &  retval
 

virtual RTCBaseList* RTM::RtcManager::component_list  )  [virtual]
 

[CORBA interface] Get component list

Get component list.

virtual RTCBase_ptr RTM::RtcManager::create_component const char *  module_name,
const char *  category_name,
CORBA::String_out  instance_name
[virtual]
 

[CORBA interface] Create component instance

Create component instance with component module name.

Parameters:
comp_name Component module name
comp_name Instance name (return value)

bool RTM::RtcManager::createCommand string  cmd,
boost::function2< bool, vector< string > &, vector< string > & >  func
 

Register simple interpreter command function.

RtcBase* RTM::RtcManager::createComponent const string &  module_name,
const string &  category_name
 

Create component.

RtcBase* RTM::RtcManager::createComponent const string &  module_name,
const string &  category_name,
string &  comp_name
 

Create component.

bool RTM::RtcManager::createComponentCmd const vector< string > &  cmd,
vector< string > &  retval
 

virtual RtmRes RTM::RtcManager::delete_component const char *  instance_name,
const char *  category_name
[virtual]
 

[CORBA interface] Delete component instance

Delete component instance with instance name

Parameters:
instance_name Instance name
category_name Category name

virtual RTCFactoryList* RTM::RtcManager::factory_list  )  [virtual]
 

[CORBA interface] Get component factory list

Get component factory list.

std::vector<RTCBase_ptr> RTM::RtcManager::findComponents const string &  comp_name  ) 
 

find component

RtcConfig& RTM::RtcManager::getConfig  )  [inline]
 

RtcLogbuf& RTM::RtcManager::getLogbuf  )  [inline]
 

CORBA::ORB_var RTM::RtcManager::getORB  ) 
 

Get pointer to ORB.

PortableServer::POA_var RTM::RtcManager::getPOA  ) 
 

Get pointer to POA.

void RTM::RtcManager::initManager  ) 
 

Initialize manager.

void RTM::RtcManager::initModuleProc RtcModuleInitProc  proc  ) 
 

Invoke module initialize routine.

bool RTM::RtcManager::listComponent const vector< string > &  cmd,
vector< string > &  retval
 

bool RTM::RtcManager::listModule const vector< string > &  cmd,
vector< string > &  retval
 

virtual RtmRes RTM::RtcManager::load const char *  pathname,
const char *  initfunc
[virtual]
 

[CORBA interface] Load module

Load shared library of a component by path name, and invoke initialize function.

Parameters:
pathname Component module file name
initfunc Initialize function name

bool RTM::RtcManager::loadCmd const vector< string > &  cmd,
vector< string > &  retval
 

int RTM::RtcManager::open void *  args  ) 
 

Start manager task.

bool RTM::RtcManager::registerComponent RtcFactoryBase factory  ) 
 

Register component factory.

bool RTM::RtcManager::registerComponent RtcModuleProfile profile,
RtcNewFunc  new_func,
RtcDeleteFunc  delete_func
 

Register component factory.

void RTM::RtcManager::runManager  ) 
 

Run manager.

void RTM::RtcManager::runManagerNoBlocking  ) 
 

Run manager (No blocking mode).

void RTM::RtcManager::shutdown  ) 
 

int RTM::RtcManager::svc void   ) 
 

Thread function of service.

virtual RtmRes RTM::RtcManager::unload const char *  pathname  )  [virtual]
 

[CORBA interface] Unload module

Unload shared library of a component module.

Parameters:
pathname Component module file name

bool RTM::RtcManager::unloadCmd const vector< string > &  cmd,
vector< string > &  retval
 


Member Data Documentation

ComponentMap RTM::RtcManager::m_Components
 

Component instance database map.

RtcLogbuf RTM::RtcManager::m_Logbuf
 

Logger buffer.

TimedString RTM::RtcManager::m_LoggerOut
 

string RTM::RtcManager::m_ManagerName
 

Manager name.

RtcMedLogbuf RTM::RtcManager::m_MedLogbuf
 

Logger mediation buffer.

LogEmitter* RTM::RtcManager::m_pLogEmitter
 

LogOutPort* RTM::RtcManager::m_pLoggerOutPort
 

RTCBase_var RTM::RtcManager::m_pMasterLogger
 

RtcLogStream RTM::RtcManager::rtcout
 

Logger stream.


The documentation for this class was generated from the following file:
Generated on Mon May 23 03:13:58 2005 for OpenRTM by doxygen 1.3.6