iCub-main
|
An abstract class that provides basic methods for interfacing with the data acquisition. More...
#include <models.h>
Public Member Functions | |
Model () | |
Constructor. More... | |
std::string | getName () const |
Retrieve the model name. More... | |
void | attachNode (Node &node) |
Attach a node object to the model. More... | |
Node * | getNode (const std::string &name) const |
Retrieve an attached node by its name. More... | |
virtual bool | fromProperty (const yarp::os::Property &options)=0 |
Configure the model taking its parameters from a Property object. More... | |
virtual void | toProperty (yarp::os::Property &options) const =0 |
Return a Property representation of all the model 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 models need to be calibrated to properly operate. More... | |
virtual bool | isCalibrated () const =0 |
Return the internal status of the calibration. More... | |
virtual bool | getOutput (yarp::os::Value &out) const =0 |
Provide the higher layers with the model output computed over the attached sensors. More... | |
virtual | ~Model () |
Destructor. More... | |
Protected Member Functions | |
virtual void | printMessage (const int logtype, const int level, const char *format,...) const |
Protected Attributes | |
std::string | name |
int | verbosity |
std::map< std::string, Node * > | nodes |
An abstract class that provides basic methods for interfacing with the data acquisition.
Model::Model | ( | ) |
Constructor.
Definition at line 32 of file models.cpp.
|
inlinevirtual |
void Model::attachNode | ( | Node & | node | ) |
Attach a node object to the model.
node | the node object to be attached, so that the mode can employ it. |
Definition at line 73 of file models.cpp.
|
pure virtual |
Some kinds of models need to be calibrated to properly operate.
This method executes the calibration phase.
options | a Property containing the calibration parameters. |
Implemented in iCub::perception::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
pure virtual |
Configure the model taking its parameters from a Property object.
options | a Property containing the configuration parameters. |
Implemented in iCub::perception::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
inline |
Node * Model::getNode | ( | const std::string & | name | ) | const |
Retrieve an attached node by its name.
name | the name of the attached node. |
Definition at line 80 of file models.cpp.
|
pure virtual |
Provide the higher layers with the model output computed over the attached sensors.
out | a Value containing the model output. |
Implemented in iCub::perception::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
pure virtual |
Return the internal status of the calibration.
Implemented in iCub::perception::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
protectedvirtual |
Definition at line 39 of file models.cpp.
|
pure virtual |
Return a Property representation of all the model parameters.
options | a Property filled with the configuration parameters. |
Implemented in iCub::perception::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
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::TactileFingersModel, and iCub::perception::SpringyFingersModel.
|
protected |