|
iCub-main
|
An abstract class that exposes the basic methods for the handling of data acquired through the attached sensors. More...
#include <nodes.h>
Inheritance diagram for iCub::perception::Node:Public Member Functions | |
| Node () | |
| Constructor. | |
| std::string | getName () const |
| Retrieve the node name. | |
| void | attachSensor (Sensor &sensor) |
| Attach a sensor object to the node. | |
| void | attachCallback (EventCallback &callback) |
| Attach an event callback to the node. | |
| void | addNeighbor (Node &node) |
| Add a node as a neighbor for the process of building the architecture. | |
| bool | removeNeighbor (const std::string &name) |
| Remove a node previously added as neighbor. | |
| Node * | getNeighbor (const std::string &name) const |
| Retrieve a neighbor node by its name. | |
| virtual bool | fromProperty (const yarp::os::Property &options)=0 |
| Configure the node taking its parameters from a Property object. | |
| virtual void | toProperty (yarp::os::Property &options) const =0 |
| Return a Property representation of all the node parameters. | |
| virtual bool | toStream (std::ostream &str) const =0 |
| Similar to the toProperty() method but it operates on output streams (e.g. | |
| virtual bool | calibrate (const yarp::os::Property &options)=0 |
| Some kinds of nodes need to be calibrated to properly operate. | |
| virtual bool | isCalibrated () const =0 |
| Return the internal status of the calibration. | |
| virtual bool | getSensorsData (yarp::os::Value &data) const =0 |
| Retrieve data from the whole set of attached sensors, giving back a standard representation of it. | |
| virtual bool | getOutput (yarp::os::Value &out) const =0 |
| Retrieve the node output computed over the sensors data. | |
| virtual | ~Node () |
| Destructor. | |
Protected Attributes | |
| std::string | name |
| std::map< std::string, Sensor * > | sensors |
| std::map< std::string, EventCallback * > | callbacks |
| std::map< std::string, Node * > | neighbors |
An abstract class that exposes the basic methods for the handling of data acquired through the attached sensors.
|
inlinevirtual |
| void Node::addNeighbor | ( | Node & | node | ) |
| void Node::attachCallback | ( | EventCallback & | callback | ) |
| void Node::attachSensor | ( | Sensor & | sensor | ) |
|
pure virtual |
Some kinds of nodes need to be calibrated to properly operate.
This method executes the calibration phase.
| options | a Property containing the calibration parameters. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
pure virtual |
Configure the node taking its parameters from a Property object.
| options | a Property containing the configuration parameters. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
inline |
| Node * Node::getNeighbor | ( | const std::string & | name | ) | const |
|
pure virtual |
Retrieve the node output computed over the sensors data.
| out | a Value containing the node output. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
pure virtual |
Retrieve data from the whole set of attached sensors, giving back a standard representation of it.
| data | a Value containing the representation of the data. It can be a double, a string, a collection of doubles and so on. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
pure virtual |
Return the internal status of the calibration.
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
| bool Node::removeNeighbor | ( | const std::string & | name | ) |
|
pure virtual |
Return a Property representation of all the node parameters.
| options | a Property filled with the configuration parameters. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
pure virtual |
Similar to the toProperty() method but it operates on output streams (e.g.
string, ofstream, ...). It allows to better manage the storing of the configuration over files.
| str | the reference to the output stream. |
Implemented in iCub::perception::SpringyFinger, and iCub::perception::TactileFinger.
|
protected |
|
protected |
|
protected |