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.


Public Member Functions

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

virtual ~RtcManager ()
 A destructor of Rtcmanager class.

int svc (void)
 A destructor of Rtcmanager class.

Thread function of service.

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 *comp_name, CORBA::String_out instance_name)
 [CORBA interface] Create component instance

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

virtual ComponentFactoryList * component_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, string &comp_name)
 Create component.

RtcBasecreateComponent (const string &module_name)
 Create 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.

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)
bool writeLog (int loglevel, std::string msg)
 Write to log file. Data and time is inserted before message, and message will be written to log file.

bool writeErrLog (int loglevel, std::string msg)
 Write to error log file. Data and time is inserted before message, and message will be written to log file.


Public Attributes

map< string, RtcBase * > m_Components
 Component instance database map.

string m_ManagerName
 Manager name.


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

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 ComponentFactoryList* RTM::RtcManager::component_factory_list  )  [virtual]
 

[CORBA interface] Get component factory list

Get component factory list.

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

[CORBA interface] Get component list

Get component list.

virtual RTCBase_ptr RTM::RtcManager::create_component const char *  comp_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  ) 
 

Create component.

RtcBase* RTM::RtcManager::createComponent const string &  module_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  )  [virtual]
 

[CORBA interface] Delete component instance

Delete component instance with instance name

Parameters:
comp_name Instance name

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

find component

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
 

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

int RTM::RtcManager::svc void   ) 
 

A destructor of Rtcmanager class.

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
 

bool RTM::RtcManager::writeErrLog int  loglevel,
std::string  msg
 

Write to error log file. Data and time is inserted before message, and message will be written to log file.

Parameters:
msg Message

bool RTM::RtcManager::writeLog int  loglevel,
std::string  msg
 

Write to log file. Data and time is inserted before message, and message will be written to log file.

Parameters:
msg Message


Member Data Documentation

map<string, RtcBase*> RTM::RtcManager::m_Components
 

Component instance database map.

string RTM::RtcManager::m_ManagerName
 

Manager name.


The documentation for this class was generated from the following file:
Generated on Thu Dec 16 15:29:19 2004 for OpenRTM by doxygen 1.3.6