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

This class implements the reading of a value from a port. More...

#include <sensors.h>

+ Inheritance diagram for iCub::perception::SensorPort:

Public Member Functions

bool configure (void *source, const yarp::os::Property &options)
 Configure the sensor. More...
 
bool getOutput (yarp::os::Value &in) const
 Retrieve the sensor output. More...
 
- Public Member Functions inherited from iCub::perception::Sensor
 Sensor ()
 Constructor. More...
 
std::string getName () const
 Retrieve the sensor name. More...
 
virtual ~Sensor ()
 Destructor. More...
 

Protected Attributes

int index
 
- Protected Attributes inherited from iCub::perception::Sensor
std::string name
 
bool configured
 
void * source
 

Detailed Description

This class implements the reading of a value from a port.

Definition at line 238 of file sensors.h.

Member Function Documentation

◆ configure()

bool SensorPort::configure ( void *  source,
const yarp::os::Property &  options 
)
virtual

Configure the sensor.

Parameters
sourcea pointer to the yarp::os::Port object.
optionsa Property containing the configuration parameters. Available options are:
name: the name of the sensor.
index: the index corresponding to the double that needs to be retrieved.
Returns
true/false on success/failure.

Implements iCub::perception::Sensor.

Definition at line 120 of file sensors.cpp.

◆ getOutput()

bool SensorPort::getOutput ( yarp::os::Value &  in) const
virtual

Retrieve the sensor output.

Parameters
inis filled with the current output value.
Returns
true/false on success/failure.

Implements iCub::perception::Sensor.

Definition at line 134 of file sensors.cpp.

Member Data Documentation

◆ index

int iCub::perception::SensorPort::index
protected

Definition at line 241 of file sensors.h.


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