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:

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 25 of file Node.h.

Classes

class  Helper
 

Public Member Functions

 Node ()
 
 Node (const std::string &name)
 
virtual ~Node ()
 
virtual void add (Contactable &contactable) override
 add a contactable to this node. More...
 
virtual 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 ()
 

Private Attributes

Helper *const mPriv
 

Constructor & Destructor Documentation

◆ Node() [1/2]

Node::Node ( )

Definition at line 543 of file Node.cpp.

◆ Node() [2/2]

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

Definition at line 550 of file Node.cpp.

◆ ~Node()

Node::~Node ( )
virtual

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

◆ interrupt()

void Node::interrupt ( )

interrupt delegates the call to the Node port interrupt.

Definition at line 599 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 609 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 590 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 585 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 580 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 604 of file Node.cpp.

Member Data Documentation

◆ mPriv

Helper* const yarp::os::Node::mPriv
private

Definition at line 81 of file Node.h.


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