iCub-main
Public Member Functions | Protected Attributes | List of all members
iCub::perception::Sensor Class Referenceabstract

An abstract class that exposes the basic methods for sensors handling. More...

#include <sensors.h>

+ Inheritance diagram for iCub::perception::Sensor:

Public Member Functions

 Sensor ()
 Constructor. More...
 
std::string getName () const
 Retrieve the sensor name. More...
 
virtual bool configure (void *source, const yarp::os::Property &options)=0
 Configure the sensor. More...
 
virtual bool getOutput (yarp::os::Value &in) const =0
 Retrieve the sensor raw output. More...
 
virtual ~Sensor ()
 Destructor. More...
 

Protected Attributes

std::string name
 
bool configured
 
void * source
 

Detailed Description

An abstract class that exposes the basic methods for sensors handling.

Definition at line 115 of file sensors.h.

Constructor & Destructor Documentation

◆ Sensor()

Sensor::Sensor ( )

Constructor.

Definition at line 35 of file sensors.cpp.

◆ ~Sensor()

virtual iCub::perception::Sensor::~Sensor ( )
inlinevirtual

Destructor.

Definition at line 157 of file sensors.h.

Member Function Documentation

◆ configure()

virtual bool iCub::perception::Sensor::configure ( void *  source,
const yarp::os::Property &  options 
)
pure virtual

Configure the sensor.

Parameters
sourcea pointer to the underlying structure to which the sensor is attached.
optionsa Property containing the configuration parameters.
Returns
true/false on success/failure.

Implemented in iCub::perception::SensorPort, iCub::perception::SensorEncoderArrays, and iCub::perception::SensorEncoders.

◆ getName()

std::string iCub::perception::Sensor::getName ( ) const
inline

Retrieve the sensor name.

Returns
a string containing the sensor name.

Definition at line 132 of file sensors.h.

◆ getOutput()

virtual bool iCub::perception::Sensor::getOutput ( yarp::os::Value &  in) const
pure virtual

Retrieve the sensor raw output.

Parameters
ina value containing the sensor output.
Returns
true/false on success/failure.

Implemented in iCub::perception::SensorPort, iCub::perception::SensorEncoderArrays, and iCub::perception::SensorEncoders.

Member Data Documentation

◆ configured

bool iCub::perception::Sensor::configured
protected

Definition at line 119 of file sensors.h.

◆ name

std::string iCub::perception::Sensor::name
protected

Definition at line 118 of file sensors.h.

◆ source

void* iCub::perception::Sensor::source
protected

Definition at line 120 of file sensors.h.


The documentation for this class was generated from the following files: