36 #ifndef __PERCEPTIVEMODELS_MODELS_H__
37 #define __PERCEPTIVEMODELS_MODELS_H__
43 #include <yarp/os/Value.h>
44 #include <yarp/os/Property.h>
67 std::map<std::string,Node*>
nodes;
69 virtual void printMessage(
const int logtype,
const int level,
70 const char *format, ...)
const;
115 virtual void toProperty(yarp::os::Property &options)
const = 0;
125 virtual bool toStream(std::ostream &str)
const = 0;
138 virtual bool calibrate(
const yarp::os::Property &options) = 0;
An abstract class that provides basic methods for interfacing with the data acquisition.
virtual bool toStream(std::ostream &str) const =0
Similar to the toProperty() method but it operates on output streams (e.g.
virtual void printMessage(const int logtype, const int level, const char *format,...) const
virtual bool getOutput(yarp::os::Value &out) const =0
Provide the higher layers with the model output computed over the attached sensors.
virtual bool isCalibrated() const =0
Return the internal status of the calibration.
Node * getNode(const std::string &name) const
Retrieve an attached node by its name.
void attachNode(Node &node)
Attach a node object to the model.
virtual bool calibrate(const yarp::os::Property &options)=0
Some kinds of models need to be calibrated to properly operate.
virtual ~Model()
Destructor.
virtual bool fromProperty(const yarp::os::Property &options)=0
Configure the model taking its parameters from a Property object.
std::map< std::string, Node * > nodes
virtual void toProperty(yarp::os::Property &options) const =0
Return a Property representation of all the model parameters.
std::string getName() const
Retrieve the model name.
An abstract class that exposes the basic methods for the handling of data acquired through the attach...
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.