YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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.
 
void remove (Contactable &contactable) override
 remove specified contactable from the list of contactables associated with this Node.
 
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.
 
void update (Contactable &contactable)
 update should update the contactable with new information.
 
void prepare (const std::string &name)
 prepare if it is not already been done, opens the port of the Node.
 
void interrupt ()
 interrupt delegates the call to the Node port interrupt.
 
Contact where ()
 where getter fot information about the port of the Node.
 
- 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 22 of file Node.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node::Node ( )

Definition at line 541 of file Node.cpp.

◆ Node() [2/2]

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

Definition at line 548 of file Node.cpp.

◆ ~Node()

Node::~Node ( )
virtual

Definition at line 563 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 573 of file Node.cpp.

◆ interrupt()

void Node::interrupt ( )

interrupt delegates the call to the Node port interrupt.

Definition at line 597 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 607 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 588 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 583 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 578 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 602 of file Node.cpp.


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