#include <yarp/os/Nodes.h>
Classes | |
class | Private |
Public Member Functions | |
Nodes () | |
virtual | ~Nodes () |
void | add (Contactable &contactable) override |
add a Contactable to the Node specified in the contactable name (see NestedContact.nodeName). More... | |
void | remove (Contactable &contactable) override |
remove a Contactable from the Node specified in the contactable's name. More... | |
virtual Contact | query (const std::string &name, const std::string &category="") override |
query the list of Node to find a Contact with the specified name. More... | |
virtual void | update (Contactable &contactable) |
update a Node information in this container. More... | |
Contact | getParent (const std::string &name) |
getParent get info about node associated with the specified port. More... | |
Contact | getURI (const std::string &name) |
getURI queries the Node specified in the name parameter to get Contact information about the specified port More... | |
void | prepare (const std::string &name) |
prepare checks for the existence of the node specified in the name parameter. More... | |
void | interrupt () |
interrupt delegates interrupt call to all of the Node in this container. More... | |
bool | enable (bool flag) |
enable setter for the activity state of the container. More... | |
void | clear () |
clear empties the container More... | |
void | setActiveName (const std::string &name) |
setActiveName setter for the currently active node More... | |
void | addExternalNode (const std::string &name, Node &node) |
addExternalNode adds a Node to this container. More... | |
void | removeExternalNode (const std::string &name) |
removeExternalNode erase the node from the container. More... | |
std::string | getActiveName () |
getActiveName getter for the currently active node's name More... | |
bool | requireActiveName () |
requireActiveName if there is no active node, creates a temporary one. More... | |
Public Member Functions inherited from yarp::os::Contactables | |
virtual | ~Contactables () |
The Nodes class.
A container for multiple nodes, keeping information about the currently active node. When a Publisher or a Subscriber is registered, a NestedContact will be created associating the topic to the active Node if present. The active Node is the last instantiated in temporal order. Instantiation of multiple Publisher/Subscriber associated with multiple Node is not thread safe.
|
overridevirtual |
add a Contactable to the Node specified in the contactable name (see NestedContact.nodeName).
If the specified node is in this container, add the contactable to it, otherwise firstly creates the node and add it to this container.
contactable | to be added |
Implements yarp::os::Contactables.
void Nodes::addExternalNode | ( | const std::string & | name, |
Node & | node | ||
) |
bool Nodes::enable | ( | bool | flag | ) |
std::string Nodes::getActiveName | ( | ) |
Contact Nodes::getParent | ( | const std::string & | name | ) |
Contact Nodes::getURI | ( | const std::string & | name | ) |
void Nodes::interrupt | ( | ) |
void Nodes::prepare | ( | const std::string & | name | ) |
prepare checks for the existence of the node specified in the name parameter.
If the node doesn't exists, creates it. If the name parameter is not representing a NestedContact, does nothing.
name | of a port in the format /topic@/node |
|
overridevirtual |
|
overridevirtual |
remove a Contactable from the Node specified in the contactable's name.
contactable | to be removed |
Implements yarp::os::Contactables.
void Nodes::removeExternalNode | ( | const std::string & | name | ) |
bool Nodes::requireActiveName | ( | ) |
void Nodes::setActiveName | ( | const std::string & | name | ) |
|
virtual |