OpenRTM-aist 2.0.2
Loading...
Searching...
No Matches
RTC::NamingManager Class Reference

NamingServer management class. More...

#include <NamingManager.h>

Collaboration diagram for RTC::NamingManager:

Classes

struct  Comps
 Structure for component management . More...
 
struct  Mgr
 Structure for ManagerServant management . More...
 
struct  Port
 Structure for component management . More...
 

Public Member Functions

 NamingManager (Manager *manager)
 Constructor.
 
virtual ~NamingManager ()
 Destructor.
 
void registerNameServer (const char *method, const char *name_server)
 Regster the NameServer.
 
void bindObject (const char *name, const PortBase *port)
 Bind the specified objects to NamingService.
 
void bindObject (const char *name, const RTObject_impl *rtobj)
 
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.
 
std::vector< NamingService * > & getNameServices ()
 
RTCList string_to_component (const std::string &name)
 registerMgrName
 

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 registerPortName (const char *name, const PortBase *port)
 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 unregisterPortName (const char *name)
 
void unregisterMgrName (const char *name)
 Unregister the ManagerServants that will be registered to NameServer.
 
void retryConnection (NamingService *ns)
 Rebind the component to NameServer.
 

Protected Attributes

std::vector< NamingService * > m_names
 NameServer list .
 
std::mutex m_namesMutex
 Mutex of NameServer list .
 
std::vector< Comps * > m_compNames
 Component list .
 
std::mutex m_compNamesMutex
 Mutex of Component list .
 
std::vector< Port * > m_portNames
 Component list .
 
std::mutex m_portNamesMutex
 Mutex of Port list .
 
std::vector< Mgr * > m_mgrNames
 ManagerServant list .
 
std::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

◆ NamingManager()

RTC::NamingManager::NamingManager ( Manager * manager)
explicit

Constructor.

Constructor

Parameters
managerManager object

◆ ~NamingManager()

virtual RTC::NamingManager::~NamingManager ( )
virtual

Destructor.

Member Function Documentation

◆ bindCompsTo()

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

◆ bindObject() [1/3]

void RTC::NamingManager::bindObject ( const char * name,
const PortBase * port )

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

◆ bindObject() [2/3]

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

◆ bindObject() [3/3]

void RTC::NamingManager::bindObject ( const char * name,
const RTObject_impl * rtobj )

◆ createNamingObj()

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

◆ getNameServices()

std::vector< NamingService * > & RTC::NamingManager::getNameServices ( )
inline

References m_names.

◆ getObjects()

std::vector< RTObject_impl * > RTC::NamingManager::getObjects ( )

Get all bound objects.

Get all bound objects.

Returns
Bound object list

◆ registerCompName()

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

◆ registerMgrName()

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

◆ registerNameServer()

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

◆ registerPortName()

void RTC::NamingManager::registerPortName ( const char * name,
const PortBase * port )
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

◆ retryConnection()

void RTC::NamingManager::retryConnection ( NamingService * ns)
protected

Rebind the component to NameServer.

Connect with the NameServer and rebind the component.

Parameters
nsNameServer

◆ string_to_component()

RTCList RTC::NamingManager::string_to_component ( const std::string & name)

registerMgrName

Parameters
name
Returns

◆ unbindAll()

void RTC::NamingManager::unbindAll ( )

Unbind all objects from NamingService.

Unbind all objects from CORBA NamingService.

◆ unbindObject()

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

◆ unregisterCompName()

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

◆ unregisterMgrName()

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

◆ unregisterPortName()

void RTC::NamingManager::unregisterPortName ( const char * name)
protected

◆ update()

void RTC::NamingManager::update ( )

Update information of NamingServer.

Update the object information registered in the specified NameServer.

Member Data Documentation

◆ m_compNames

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

Component list .

◆ m_compNamesMutex

std::mutex RTC::NamingManager::m_compNamesMutex
protected

Mutex of Component list .

◆ m_manager

Manager* RTC::NamingManager::m_manager
protected

Manager object .

◆ m_mgrNames

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

ManagerServant list .

◆ m_mgrNamesMutex

std::mutex RTC::NamingManager::m_mgrNamesMutex
protected

Mutex of ManagerServant list .

◆ m_names

std::vector<NamingService*> RTC::NamingManager::m_names
protected

NameServer list .

Referenced by getNameServices().

◆ m_namesMutex

std::mutex RTC::NamingManager::m_namesMutex
protected

Mutex of NameServer list .

◆ m_portNames

std::vector<Port*> RTC::NamingManager::m_portNames
protected

Component list .

◆ m_portNamesMutex

std::mutex RTC::NamingManager::m_portNamesMutex
protected

Mutex of Port list .

◆ rtclog

Logger RTC::NamingManager::rtclog
protected

Logger stream .


The documentation for this class was generated from the following file: