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

This class implements the reading of encoders through MultipleAnalogSensors (MAS) interfaces. More...

#include <sensors.h>

+ Inheritance diagram for iCub::perception::SensorEncoderArrays:

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 encoder value. 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 num_arrays
 
int index_array
 
int index_element
 
yarp::os::Value latch
 
- Protected Attributes inherited from iCub::perception::Sensor
std::string name
 
bool configured
 
void * source
 

Detailed Description

This class implements the reading of encoders through MultipleAnalogSensors (MAS) interfaces.

Definition at line 201 of file sensors.h.

Member Function Documentation

◆ configure()

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

Configure the sensor.

Parameters
sourcea pointer to the yarp::dev::IEncoderArrays interface.
optionsa Property containing the configuration parameters. Available options are:
name: the name of the sensor.
num_arrays: the number of available arrays.
index_array: the index of the array to be sensed. index_element: the index of the element of the array.
Returns
true/false on success/failure.

Implements iCub::perception::Sensor.

Definition at line 74 of file sensors.cpp.

◆ getOutput()

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

Retrieve the sensor encoder value.

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

Implements iCub::perception::Sensor.

Definition at line 91 of file sensors.cpp.

Member Data Documentation

◆ index_array

int iCub::perception::SensorEncoderArrays::index_array
protected

Definition at line 205 of file sensors.h.

◆ index_element

int iCub::perception::SensorEncoderArrays::index_element
protected

Definition at line 206 of file sensors.h.

◆ latch

yarp::os::Value iCub::perception::SensorEncoderArrays::latch
mutableprotected

Definition at line 207 of file sensors.h.

◆ num_arrays

int iCub::perception::SensorEncoderArrays::num_arrays
protected

Definition at line 204 of file sensors.h.


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