An abstract name space for ports. More...
#include <yarp/os/NameSpace.h>
Public Member Functions | |
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 Contact | getNameServerContact () const =0 |
Get an address for a name server that manages the name space, if available. More... | |
virtual std::string | getNameServerName () const |
Get the port name of a name server that manages the name space, if available. More... | |
virtual Contact | queryName (const std::string &name)=0 |
Map from port name to contact information. More... | |
virtual Contact | registerName (const std::string &name)=0 |
Record contact information to tie to a port name. More... | |
virtual Contact | registerContact (const Contact &contact)=0 |
Record contact information (should include a port name). More... | |
virtual Contact | unregisterName (const std::string &name)=0 |
Disassociate contact information from a port name. More... | |
virtual Contact | unregisterContact (const Contact &contact)=0 |
Disassociate contact information (should include a port name). 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 std::string &name, NameStore *store) |
Remove contact information, with access to the contact information of other ports for cross-referencing. More... | |
virtual bool | setProperty (const std::string &name, const std::string &key, const Value &value)=0 |
Associate a key/value pair with a named port. More... | |
virtual Value * | getProperty (const std::string &name, const std::string &key)=0 |
Get the value of a named key from a named port. More... | |
virtual bool | connectPortToTopic (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Publish a port to a topic. More... | |
virtual bool | connectTopicToPort (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Subscribe a port to a topic. More... | |
virtual bool | disconnectPortFromTopic (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Stop publishing a port to a topic. More... | |
virtual bool | disconnectTopicFromPort (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Stop subscribing a port to a topic. More... | |
virtual bool | connectPortToPortPersistently (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Connect two ports with persistence. More... | |
virtual bool | disconnectPortToPortPersistently (const Contact &src, const Contact &dest, const ContactStyle &style)=0 |
Disconnect two ports, removing any persistence. More... | |
virtual bool | localOnly () const =0 |
Check if the NameSpace is only valid for the current process ("local"). More... | |
virtual bool | usesCentralServer () const =0 |
Check if a central server is involved in managing the NameSpace. More... | |
virtual bool | serverAllocatesPortNumbers () const =0 |
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 =0 |
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)=0 |
Find a name server for this NameSpace, if applicable. More... | |
virtual bool | writeToNameServer (PortWriter &cmd, PortReader &reply, const ContactStyle &style)=0 |
Write a message to a name server for this NameSpace, if applicable. More... | |
An abstract name space for ports.
This collects all the services we may ask of a name server, to simplify plugging in alternate implementations.
Definition at line 25 of file NameSpace.h.
|
virtualdefault |
Destructor.
|
virtual |
Check if a name space is available.
Definition at line 20 of file NameSpace.cpp.
|
virtual |
Check if a name space is available, with a timeout on any network operations needed.
If the timeout occurs, we assume the name space is not available.
[in] | timeout | time in seconds to wait for a response in any network operation needed. |
Definition at line 43 of file NameSpace.cpp.
|
pure virtual |
When connections are made involving ports managed by this NameSpace do the ports involved end up knowing the names of their counterparties?
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Connect two ports with persistence.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Publish a port to a topic.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Subscribe a port to a topic.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Find a name server for this NameSpace, if applicable.
useDetectedServer | use any server found for future queries. |
scanNeeded | set to true if a search was needed, rather than finding a name server based on cached hints. |
serverUsed | set to true if a server was found and marked for use in future queries. |
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Stop publishing a port to a topic.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Disconnect two ports, removing any persistence.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Stop subscribing a port to a topic.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Get an address for a name server that manages the name space, if available.
Implemented in yarp::os::YarpDummyNameSpace, yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
virtual |
Get the port name of a name server that manages the name space, if available.
Definition at line 67 of file NameSpace.cpp.
|
pure virtual |
Get the value of a named key from a named port.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Check if the NameSpace is only valid for the current process ("local").
Implemented in yarp::os::YarpDummyNameSpace, yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Map from port name to contact information.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
inlinevirtual |
Record contact information, with access to the contact information of other ports for cross-referencing.
contact | the contact information to record |
store | an interface to port information as presented via the YARP client API (as opposed to what a single NameSpace would have access to). |
Reimplemented in yarp::os::RosNameSpace.
Definition at line 96 of file NameSpace.h.
Record contact information (should include a port name).
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Record contact information to tie to a port name.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Check if a central server is responsible for allocating port numbers, or if this should be left up to the operating system.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Associate a key/value pair with a named port.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
inlinevirtual |
Remove contact information, with access to the contact information of other ports for cross-referencing.
Reimplemented in yarp::os::RosNameSpace.
Definition at line 107 of file NameSpace.h.
Disassociate contact information (should include a port name).
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Disassociate contact information from a port name.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Check if a central server is involved in managing the NameSpace.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.
|
pure virtual |
Write a message to a name server for this NameSpace, if applicable.
Messages are name-server-specific.
Implemented in yarp::os::YarpNameSpace, yarp::os::RosNameSpace, and yarp::os::MultiNameSpace.