YARP  2.3.70.1
Yet Another Robot Platform
yarp::os::YarpNameSpace Class Reference

#include <yarp/os/YarpNameSpace.h>

+ Inheritance diagram for yarp::os::YarpNameSpace:

Public Member Functions

 YarpNameSpace (const Contact &contact)
 
virtual ~YarpNameSpace ()
 
virtual Contact getNameServerContact () const YARP_OVERRIDE
 Get an address for a name server that manages the name space, if available. More...
 
virtual Contact queryName (const ConstString &name) YARP_OVERRIDE
 Map from port name to contact information. More...
 
virtual Contact registerName (const ConstString &name) YARP_OVERRIDE
 Record contact information to tie to a port name. More...
 
virtual Contact registerContact (const Contact &contact) YARP_OVERRIDE
 Record contact information (should include a port name). More...
 
virtual Contact unregisterName (const ConstString &name) YARP_OVERRIDE
 Disassociate contact information from a port name. More...
 
virtual Contact unregisterContact (const Contact &contact) YARP_OVERRIDE
 Disassociate contact information (should include a port name). More...
 
virtual bool setProperty (const ConstString &name, const ConstString &key, const Value &value) YARP_OVERRIDE
 Associate a key/value pair with a named port. More...
 
virtual ValuegetProperty (const ConstString &name, const ConstString &key) YARP_OVERRIDE
 Get the value of a named key from a named port. More...
 
virtual bool connectPortToTopic (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Publish a port to a topic. More...
 
virtual bool connectTopicToPort (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Subscribe a port to a topic. More...
 
virtual bool disconnectPortFromTopic (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Stop publishing a port to a topic. More...
 
virtual bool disconnectTopicFromPort (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Stop subscribing a port to a topic. More...
 
virtual bool connectPortToPortPersistently (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Connect two ports with persistence. More...
 
virtual bool disconnectPortToPortPersistently (const Contact &src, const Contact &dest, ContactStyle style) YARP_OVERRIDE
 Disconnect two ports, removing any persistence. More...
 
virtual bool connectTopic (const ConstString &dir, bool srcIsTopic, bool destIsTopic, const Contact &src, const Contact &dest, ContactStyle style)
 
virtual bool localOnly () const YARP_OVERRIDE
 Check if the NameSpace is only valid for the current process ("local"). More...
 
virtual bool usesCentralServer () const YARP_OVERRIDE
 Check if a central server is involved in managing the NameSpace. More...
 
virtual bool serverAllocatesPortNumbers () const YARP_OVERRIDE
 Check if a central server is responsible for allocating port numbers, or if this should be left up to the operating system. More...
 
virtual bool connectionHasNameOfEndpoints () const YARP_OVERRIDE
 When connections are made involving ports managed by this NameSpace do the ports involved end up knowing the names of their counterparties? More...
 
virtual Contact detectNameServer (bool useDetectedServer, bool &scanNeeded, bool &serverUsed) YARP_OVERRIDE
 Find a name server for this NameSpace, if applicable. More...
 
virtual bool writeToNameServer (PortWriter &cmd, PortReader &reply, const ContactStyle &style) YARP_OVERRIDE
 Write a message to a name server for this NameSpace, if applicable. More...
 
- Public Member Functions inherited from yarp::os::NameSpace
virtual ~NameSpace ()
 Destructor. More...
 
virtual bool checkNetwork ()
 Check if a name space is available. More...
 
virtual bool checkNetwork (double timeout)
 Check if a name space is available, with a timeout on any network operations needed. More...
 
virtual ConstString getNameServerName () const
 Get the port name of a name server that manages the name space, if available. More...
 
virtual Contact registerAdvanced (const Contact &contact, NameStore *store)
 Record contact information, with access to the contact information of other ports for cross-referencing. More...
 
virtual Contact unregisterAdvanced (const ConstString &name, NameStore *store)
 Remove contact information, with access to the contact information of other ports for cross-referencing. More...
 

Private Attributes

void * system_resource
 
Contact contact
 

Detailed Description

Definition at line 21 of file YarpNameSpace.h.

Constructor & Destructor Documentation

◆ YarpNameSpace()

YarpNameSpace::YarpNameSpace ( const Contact contact)

Definition at line 19 of file YarpNameSpace.cpp.

◆ ~YarpNameSpace()

YarpNameSpace::~YarpNameSpace ( )
virtual

Definition at line 26 of file YarpNameSpace.cpp.

Member Function Documentation

◆ connectionHasNameOfEndpoints()

virtual bool yarp::os::YarpNameSpace::connectionHasNameOfEndpoints ( ) const
inlinevirtual

When connections are made involving ports managed by this NameSpace do the ports involved end up knowing the names of their counterparties?

Implements yarp::os::NameSpace.

Definition at line 145 of file YarpNameSpace.h.

◆ connectPortToPortPersistently()

virtual bool yarp::os::YarpNameSpace::connectPortToPortPersistently ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Connect two ports with persistence.

Implements yarp::os::NameSpace.

Definition at line 70 of file YarpNameSpace.h.

◆ connectPortToTopic()

virtual bool yarp::os::YarpNameSpace::connectPortToTopic ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Publish a port to a topic.

Implements yarp::os::NameSpace.

Definition at line 46 of file YarpNameSpace.h.

◆ connectTopic()

virtual bool yarp::os::YarpNameSpace::connectTopic ( const ConstString dir,
bool  srcIsTopic,
bool  destIsTopic,
const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Definition at line 82 of file YarpNameSpace.h.

◆ connectTopicToPort()

virtual bool yarp::os::YarpNameSpace::connectTopicToPort ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Subscribe a port to a topic.

Implements yarp::os::NameSpace.

Definition at line 52 of file YarpNameSpace.h.

◆ detectNameServer()

Contact YarpNameSpace::detectNameServer ( bool  useDetectedServer,
bool &  scanNeeded,
bool &  serverUsed 
)
virtual

Find a name server for this NameSpace, if applicable.

Parameters
useDetectedServeruse any server found for future queries.
scanNeededset to true if a search was needed, rather than finding a name server based on cached hints.
serverUsedset to true if a server was found and marked for use in future queries.

Implements yarp::os::NameSpace.

Definition at line 125 of file YarpNameSpace.cpp.

◆ disconnectPortFromTopic()

virtual bool yarp::os::YarpNameSpace::disconnectPortFromTopic ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Stop publishing a port to a topic.

Implements yarp::os::NameSpace.

Definition at line 58 of file YarpNameSpace.h.

◆ disconnectPortToPortPersistently()

virtual bool yarp::os::YarpNameSpace::disconnectPortToPortPersistently ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Disconnect two ports, removing any persistence.

Implements yarp::os::NameSpace.

Definition at line 76 of file YarpNameSpace.h.

◆ disconnectTopicFromPort()

virtual bool yarp::os::YarpNameSpace::disconnectTopicFromPort ( const Contact src,
const Contact dest,
ContactStyle  style 
)
inlinevirtual

Stop subscribing a port to a topic.

Implements yarp::os::NameSpace.

Definition at line 64 of file YarpNameSpace.h.

◆ getNameServerContact()

virtual Contact yarp::os::YarpNameSpace::getNameServerContact ( ) const
inlinevirtual

Get an address for a name server that manages the name space, if available.

Implements yarp::os::NameSpace.

Reimplemented in yarp::os::YarpDummyNameSpace.

Definition at line 27 of file YarpNameSpace.h.

◆ getProperty()

Value * YarpNameSpace::getProperty ( const ConstString name,
const ConstString key 
)
virtual

Get the value of a named key from a named port.

Returns
YARP_NULLPTR if no value was set for the named key.

Implements yarp::os::NameSpace.

Definition at line 113 of file YarpNameSpace.cpp.

◆ localOnly()

virtual bool yarp::os::YarpNameSpace::localOnly ( ) const
inlinevirtual

Check if the NameSpace is only valid for the current process ("local").

Implements yarp::os::NameSpace.

Reimplemented in yarp::os::YarpDummyNameSpace.

Definition at line 133 of file YarpNameSpace.h.

◆ queryName()

Contact YarpNameSpace::queryName ( const ConstString name)
virtual

Map from port name to contact information.

Implements yarp::os::NameSpace.

Definition at line 33 of file YarpNameSpace.cpp.

◆ registerContact()

Contact YarpNameSpace::registerContact ( const Contact contact)
virtual

Record contact information (should include a port name).

Implements yarp::os::NameSpace.

Definition at line 43 of file YarpNameSpace.cpp.

◆ registerName()

Contact YarpNameSpace::registerName ( const ConstString name)
virtual

Record contact information to tie to a port name.

Implements yarp::os::NameSpace.

Definition at line 39 of file YarpNameSpace.cpp.

◆ serverAllocatesPortNumbers()

virtual bool yarp::os::YarpNameSpace::serverAllocatesPortNumbers ( ) const
inlinevirtual

Check if a central server is responsible for allocating port numbers, or if this should be left up to the operating system.

Implements yarp::os::NameSpace.

Definition at line 141 of file YarpNameSpace.h.

◆ setProperty()

bool YarpNameSpace::setProperty ( const ConstString name,
const ConstString key,
const Value value 
)
virtual

Associate a key/value pair with a named port.

Implements yarp::os::NameSpace.

Definition at line 99 of file YarpNameSpace.cpp.

◆ unregisterContact()

Contact YarpNameSpace::unregisterContact ( const Contact contact)
virtual

Disassociate contact information (should include a port name).

Implements yarp::os::NameSpace.

Definition at line 93 of file YarpNameSpace.cpp.

◆ unregisterName()

Contact YarpNameSpace::unregisterName ( const ConstString name)
virtual

Disassociate contact information from a port name.

Implements yarp::os::NameSpace.

Definition at line 71 of file YarpNameSpace.cpp.

◆ usesCentralServer()

virtual bool yarp::os::YarpNameSpace::usesCentralServer ( ) const
inlinevirtual

Check if a central server is involved in managing the NameSpace.

Implements yarp::os::NameSpace.

Definition at line 137 of file YarpNameSpace.h.

◆ writeToNameServer()

bool YarpNameSpace::writeToNameServer ( PortWriter cmd,
PortReader reply,
const ContactStyle style 
)
virtual

Write a message to a name server for this NameSpace, if applicable.

Messages are name-server-specific.

Implements yarp::os::NameSpace.

Definition at line 152 of file YarpNameSpace.cpp.

Member Data Documentation

◆ contact

Contact yarp::os::YarpNameSpace::contact
private

Definition at line 159 of file YarpNameSpace.h.

◆ system_resource

void* yarp::os::YarpNameSpace::system_resource
private

Definition at line 158 of file YarpNameSpace.h.


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