36#ifndef __PERCEPTIVEMODELS_NODES_H__
37#define __PERCEPTIVEMODELS_NODES_H__
42#include <yarp/os/Value.h>
43#include <yarp/os/Property.h>
166 virtual void toProperty(yarp::os::Property &options)
const = 0;
176 virtual bool toStream(std::ostream &str)
const = 0;
187 virtual bool calibrate(
const yarp::os::Property &options) = 0;
An abstract class that provides basic events handling.
virtual void execute(void *ptr)=0
The callback routine.
std::string getName() const
Retrieve the node name.
EventCallback()
Constructor.
An abstract class that exposes the basic methods for the handling of data acquired through the attach...
std::map< std::string, EventCallback * > callbacks
std::map< std::string, Node * > neighbors
virtual ~Node()
Destructor.
std::map< std::string, Sensor * > sensors
virtual void toProperty(yarp::os::Property &options) const =0
Return a Property representation of all the node parameters.
virtual bool fromProperty(const yarp::os::Property &options)=0
Configure the node taking its parameters from a Property object.
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.
void attachCallback(EventCallback &callback)
Attach an event callback to the node.
void attachSensor(Sensor &sensor)
Attach a sensor object to the node.
virtual bool isCalibrated() const =0
Return the internal status of the calibration.
virtual bool calibrate(const yarp::os::Property &options)=0
Some kinds of nodes need to be calibrated to properly operate.
Node * getNeighbor(const std::string &name) const
Retrieve a neighbor node by its name.
std::string getName() const
Retrieve the node name.
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 toStream(std::ostream &str) const =0
Similar to the toProperty() method but it operates on output streams (e.g.
virtual bool getOutput(yarp::os::Value &out) const =0
Retrieve the node output computed over the sensors data.
An abstract class that exposes the basic methods for sensors handling.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.