YARP
Yet Another Robot Platform
yarp::os::Node Class Reference

The Node class. More...

#include <yarp/os/Node.h>

+ Inheritance diagram for yarp::os::Node:

Classes

class  Helper
 

Public Member Functions

 Node ()
 
 Node (const std::string &name)
 
virtual ~Node ()
 
void add (Contactable &contactable) override
 add a contactable to this node. More...
 
void remove (Contactable &contactable) override
 remove specified contactable from the list of contactables associated with this Node. More...
 
virtual Contact query (const std::string &name, const std::string &category="") override
 query the Node to obtain Contact information about a nested port associated with this Node. More...
 
void update (Contactable &contactable)
 update should update the contactable with new information. More...
 
void prepare (const std::string &name)
 prepare if it is not already been done, opens the port of the Node. More...
 
void interrupt ()
 interrupt delegates the call to the Node port interrupt. More...
 
Contact where ()
 where getter fot information about the port of the Node. More...
 
- Public Member Functions inherited from yarp::os::Contactables
virtual ~Contactables ()
 

Detailed Description

The Node class.

A simple entity containing information about multiple contacts. Holds a port representing the Node itself and a list of other contactables that represent Publishers and Subscribers nested within the Node.

Definition at line 26 of file Node.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node::Node ( )

Definition at line 544 of file Node.cpp.

◆ Node() [2/2]

Node::Node ( const std::string &  name)

Definition at line 551 of file Node.cpp.

◆ ~Node()

Node::~Node ( )
virtual

Definition at line 566 of file Node.cpp.

Member Function Documentation

◆ add()

void Node::add ( Contactable contactable)
overridevirtual

add a contactable to this node.

If this node still has no defined name, takes the name from the node specified in the contactable.

Parameters
contactableto be adde

Implements yarp::os::Contactables.

Definition at line 576 of file Node.cpp.

◆ interrupt()

void Node::interrupt ( )

interrupt delegates the call to the Node port interrupt.

Definition at line 600 of file Node.cpp.

◆ prepare()

void Node::prepare ( const std::string &  name)

prepare if it is not already been done, opens the port of the Node.

Parameters
nameof the Node port to be opened

Definition at line 610 of file Node.cpp.

◆ query()

Contact Node::query ( const std::string &  name,
const std::string &  category = "" 
)
overridevirtual

query the Node to obtain Contact information about a nested port associated with this Node.

Parameters
namethe nestedName to query (see NestedContact.nestedName)
categoryof the contact to be queried (see NestedContact.category)
Returns
Contact with information about required port if found, empty Contact otherwise

Implements yarp::os::Contactables.

Definition at line 591 of file Node.cpp.

◆ remove()

void Node::remove ( Contactable contactable)
overridevirtual

remove specified contactable from the list of contactables associated with this Node.

Parameters
contactableto be removed

Implements yarp::os::Contactables.

Definition at line 586 of file Node.cpp.

◆ update()

void Node::update ( Contactable contactable)

update should update the contactable with new information.

Parameters
contactableto be updated

Definition at line 581 of file Node.cpp.

◆ where()

Contact Node::where ( )

where getter fot information about the port of the Node.

Returns
a Contact with network information about this Node

Definition at line 605 of file Node.cpp.


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