OpenRTM  1.0.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
RTC::NamingManager Class Reference

NamingServer management class. More...

#include <NamingManager.h>

List of all members.

Classes

struct  Comps
 Structure for component management. More...
struct  Mgr
 Structure for ManagerServant management. More...
class  Names
 Structure for NameServer management. More...

Public Member Functions

 NamingManager (Manager *manager)
 Constructor.
virtual ~NamingManager (void)
 Destructor.
void registerNameServer (const char *method, const char *name_server)
 Regster the NameServer.
void bindObject (const char *name, const RTObject_impl *rtobj)
 Bind the specified objects to NamingService.
void bindObject (const char *name, const RTM::ManagerServant *mgr)
 Bind the specified ManagerServants to NamingService.
void update ()
 Update information of NamingServer.
void unbindObject (const char *name)
 Unbind the specified objects from NamingService.
void unbindAll ()
 Unbind all objects from NamingService.
std::vector< RTObject_impl * > getObjects ()
 Get all bound objects.

Protected Member Functions

NamingBasecreateNamingObj (const char *method, const char *name_server)
 Create objects for NameServer management.
void bindCompsTo (NamingBase *ns)
 Register the configured component to NameServer.
void registerCompName (const char *name, const RTObject_impl *rtobj)
 Configure the components that will be registered to NameServer.
void registerMgrName (const char *name, const RTM::ManagerServant *mgr)
 Configure the ManagerServants that will be registered to NameServer.
void unregisterCompName (const char *name)
 Unregister the components that will be registered to NameServer.
void unregisterMgrName (const char *name)
 Unregister the ManagerServants that will be registered to NameServer.
void retryConnection (Names *ns)

Protected Attributes

std::vector< Names * > m_names
 NameServer list.
Mutex m_namesMutex
 Mutex of NameServer list.
std::vector< Comps * > m_compNames
 Component list.
Mutex m_compNamesMutex
 Mutex of Component list.
std::vector< Mgr * > m_mgrNames
 ManagerServant list.
Mutex m_mgrNamesMutex
 Mutex of ManagerServant list.
Managerm_manager
 Manager object.
Logger rtclog
 Logger stream.

Detailed Description

NamingServer management class.

NamingServer management class. Manage to register and unregister components to NamingService.

Since:
0.4.0

Constructor & Destructor Documentation

Constructor.

Constructor

Parameters:
managerManager object
virtual RTC::NamingManager::~NamingManager ( void  ) [virtual]

Destructor.


Member Function Documentation

void RTC::NamingManager::bindCompsTo ( NamingBase ns) [protected]

Register the configured component to NameServer.

Register the already configured components to NameServer.

Parameters:
nsThe target NameServer for the registration
void RTC::NamingManager::bindObject ( const char *  name,
const RTObject_impl rtobj 
)

Bind the specified objects to NamingService.

Bind the specified objects to CORBA NamingService by specified names.

Parameters:
nameNames at the binding
rtobjThe target objects for the binding
void RTC::NamingManager::bindObject ( const char *  name,
const RTM::ManagerServant mgr 
)

Bind the specified ManagerServants to NamingService.

Bind the specified ManagerServants to CORBA NamingService by specified names.

Parameters:
nameNames at the binding
mgrThe target ManagerServants for the binding
NamingBase* RTC::NamingManager::createNamingObj ( const char *  method,
const char *  name_server 
) [protected]

Create objects for NameServer management.

Create objects of specified type for NameServer management.

Parameters:
methodNamingService format
name_serverNameServer name
Returns:
Created NameServer objects

Get all bound objects.

Get all bound objects.

Returns:
Bound object list
void RTC::NamingManager::registerCompName ( const char *  name,
const RTObject_impl rtobj 
) [protected]

Configure the components that will be registered to NameServer.

Configure the components that will be registered to NameServer.

Parameters:
nameNames of components at the registration
rtobjThe target objects for registration
void RTC::NamingManager::registerMgrName ( const char *  name,
const RTM::ManagerServant mgr 
) [protected]

Configure the ManagerServants that will be registered to NameServer.

Configure the ManagerServants that will be registered to NameServer.

Parameters:
nameNames of ManagerServants at the registration
mgrThe target ManagerServants for registration
void RTC::NamingManager::registerNameServer ( const char *  method,
const char *  name_server 
)

Regster the NameServer.

Register NameServer by specified format. Currently. only CORBA can be specified.

Parameters:
methodFormat of NamingService
name_serverName of NameServer for registration
void RTC::NamingManager::retryConnection ( Names ns) [protected]

Unbind all objects from NamingService.

Unbind all objects from CORBA NamingService.

void RTC::NamingManager::unbindObject ( const char *  name)

Unbind the specified objects from NamingService.

Unbind the specified objects from NamingService.

Parameters:
nameThe target objects for the unbinding
void RTC::NamingManager::unregisterCompName ( const char *  name) [protected]

Unregister the components that will be registered to NameServer.

Unregister the components that will be registered to NameServer.

Parameters:
nameNames of the target components for unregistration
void RTC::NamingManager::unregisterMgrName ( const char *  name) [protected]

Unregister the ManagerServants that will be registered to NameServer.

Unregister the ManagerServants that will be registered to NameServer.

Parameters:
nameNames of the target ManagerServants for unregistration

Update information of NamingServer.

Update the object information registered in the specified NameServer.


Member Data Documentation

std::vector<Comps*> RTC::NamingManager::m_compNames [protected]

Component list.

Mutex of Component list.

Manager object.

std::vector<Mgr*> RTC::NamingManager::m_mgrNames [protected]

ManagerServant list.

Mutex of ManagerServant list.

std::vector<Names*> RTC::NamingManager::m_names [protected]

NameServer list.

Mutex of NameServer list.

Logger stream.