|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
9 #ifndef YARP_OS_YARPNAMESPACE_H
10 #define YARP_OS_YARPNAMESPACE_H
31 Contact queryName(
const std::string& name)
override;
33 Contact registerName(
const std::string& name)
override;
37 Contact unregisterName(
const std::string& name)
override;
41 virtual bool setProperty(
const std::string& name,
42 const std::string& key,
43 const Value& value)
override;
45 virtual Value* getProperty(
const std::string& name,
46 const std::string& key)
override;
52 return connectTopic(
"subscribe",
false,
true, src, dest, style);
59 return connectTopic(
"subscribe",
true,
false, src, dest, style);
66 return connectTopic(
"unsubscribe",
false,
true, src, dest, style);
73 return connectTopic(
"unsubscribe",
true,
false, src, dest, style);
80 return connectTopic(
"subscribe",
false,
false, src, dest, style);
87 return connectTopic(
"unsubscribe",
false,
false, src, dest, style);
130 bool fail = (reply.
get(0).
toString() ==
"fail") || !ok;
133 fprintf(stderr,
"Failure: name server did not accept connection to topic.\n");
159 virtual Contact detectNameServer(
bool useDetectedServer,
161 bool& serverUsed)
override;
163 virtual bool writeToNameServer(
PortWriter& cmd,
168 void* system_resource;
194 #endif // YARP_OS_YARPNAMESPACE_H
A simple collection of objects that can be described and transmitted in a portable way.
virtual bool connectPortToPortPersistently(const Contact &src, const Contact &dest, const ContactStyle &style) override
Connect two ports with persistence.
static NameStore * getQueryBypass()
virtual bool disconnectPortFromTopic(const Contact &src, const Contact &dest, const ContactStyle &style) override
Stop publishing a port to a topic.
Contact getNameServerContact() const override
Get an address for a name server that manages the name space, if available.
bool localOnly() const override
Check if the NameSpace is only valid for the current process ("local").
virtual bool connectTopicToPort(const Contact &src, const Contact &dest, const ContactStyle &style) override
Subscribe a port to a topic.
static bool write(const Contact &contact, PortWriter &cmd, PortReader &reply, bool admin=false, bool quiet=false, double timeout=-1)
Send a single command to a port and await a single response.
static bool writeToNameServer(PortWriter &cmd, PortReader &reply, const ContactStyle &style)
Variant write method specialized to name server.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
virtual bool disconnectTopicFromPort(const Contact &src, const Contact &dest, const ContactStyle &style) override
Stop subscribing a port to a topic.
bool connectionHasNameOfEndpoints() const override
When connections are made involving ports managed by this NameSpace do the ports involved end up know...
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
virtual bool disconnectPortToPortPersistently(const Contact &src, const Contact &dest, const ContactStyle &style) override
Disconnect two ports, removing any persistence.
virtual bool connectPortToTopic(const Contact &src, const Contact &dest, const ContactStyle &style) override
Publish a port to a topic.
virtual bool connectTopic(const std::string &dir, bool srcIsTopic, bool destIsTopic, const Contact &src, const Contact &dest, const ContactStyle &style)
void addString(const char *str)
Places a string in the bottle, at the end of the list.
An abstract name space for ports.
bool usesCentralServer() const override
Check if a central server is involved in managing the NameSpace.
The main, catch-all namespace for YARP.
Contact getNameServerContact() const override
Get an address for a name server that manages the name space, if available.
bool serverAllocatesPortNumbers() const override
Check if a central server is responsible for allocating port numbers, or if this should be left up to...
std::string toString() const override
Return a standard text representation of the content of the object.
A single value (typically within a Bottle).
bool localOnly() const override
Check if the NameSpace is only valid for the current process ("local").