iCub-main
|
An abstract class that exposes the basic methods for the handling of data acquired through the attached sensors. More...
#include <nodes.h>
Public Member Functions | |
Node () | |
Constructor. More... | |
std::string | getName () const |
Retrieve the node name. More... | |
void | attachSensor (Sensor &sensor) |
Attach a sensor object to the node. More... | |
void | attachCallback (EventCallback &callback) |
Attach an event callback to the node. More... | |
void | addNeighbor (Node &node) |
Add a node as a neighbor for the process of building the architecture. More... | |
bool | removeNeighbor (const std::string &name) |
Remove a node previously added as neighbor. More... | |
Node * | getNeighbor (const std::string &name) const |
Retrieve a neighbor node by its name. More... | |
virtual bool | fromProperty (const yarp::os::Property &options)=0 |
Configure the node taking its parameters from a Property object. More... | |
virtual void | toProperty (yarp::os::Property &options) const =0 |
Return a Property representation of all the node parameters. More... | |
virtual bool | toStream (std::ostream &str) const =0 |
Similar to the toProperty() method but it operates on output streams (e.g. More... | |
virtual bool | calibrate (const yarp::os::Property &options)=0 |
Some kinds of nodes need to be calibrated to properly operate. More... | |
virtual bool | isCalibrated () const =0 |
Return the internal status of the calibration. More... | |
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. More... | |
virtual bool | getOutput (yarp::os::Value &out) const =0 |
Retrieve the node output computed over the sensors data. More... | |
virtual | ~Node () |
Destructor. More... | |
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::TactileFinger, and iCub::perception::SpringyFinger.
|
pure virtual |
Configure the node taking its parameters from a Property object.
options | a Property containing the configuration parameters. |
Implemented in iCub::perception::TactileFinger, and iCub::perception::SpringyFinger.
|
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::TactileFinger, and iCub::perception::SpringyFinger.
|
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::TactileFinger, and iCub::perception::SpringyFinger.
|
pure virtual |
Return the internal status of the calibration.
Implemented in iCub::perception::TactileFinger, and iCub::perception::SpringyFinger.
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::TactileFinger, and iCub::perception::SpringyFinger.
|
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::TactileFinger, and iCub::perception::SpringyFinger.
|
protected |
|
protected |
|
protected |