YARP
Yet Another Robot Platform
yarp::dev::ImplementMotor Class Reference

#include <yarp/dev/ImplementMotor.h>

+ Inheritance diagram for yarp::dev::ImplementMotor:

Public Member Functions

 ImplementMotor (yarp::dev::IMotorRaw *y)
 
virtual ~ImplementMotor ()
 
bool getNumberOfMotors (int *num) override
 Get the number of available motors. More...
 
bool getTemperature (int m, double *val) override
 Get temperature of a motor. More...
 
bool getTemperatures (double *vals) override
 Get temperature of all the motors. More...
 
bool getTemperatureLimit (int m, double *val) override
 Retreives the current temperature limit for a specific motor. More...
 
bool setTemperatureLimit (int m, const double val) override
 Set the temperature limit for a specific motor. More...
 
bool getGearboxRatio (int m, double *val) override
 Get the gearbox ratio for a specific motor. More...
 
bool setGearboxRatio (int m, const double val) override
 Set the gearbox ratio for a specific motor. More...
 
- Public Member Functions inherited from yarp::dev::IMotor
virtual ~IMotor ()
 Destructor. More...
 

Protected Member Functions

bool initialize (int size, const int *amap)
 Initialize the internal data and alloc memory. More...
 
bool uninitialize ()
 Clean up internal data and memory. More...
 

Protected Attributes

IMotorRawimotor
 
void * helper
 
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
 

Detailed Description

Definition at line 32 of file ImplementMotor.h.

Constructor & Destructor Documentation

◆ ImplementMotor()

ImplementMotor::ImplementMotor ( yarp::dev::IMotorRaw y)

Definition at line 20 of file ImplementMotor.cpp.

◆ ~ImplementMotor()

ImplementMotor::~ImplementMotor ( )
virtual

Definition at line 26 of file ImplementMotor.cpp.

Member Function Documentation

◆ getGearboxRatio()

bool ImplementMotor::getGearboxRatio ( int  m,
double *  val 
)
overridevirtual

Get the gearbox ratio for a specific motor.

Parameters
mmotor number
valretrieved gearbox ratio
Returns
true/false

Reimplemented from yarp::dev::IMotor.

Definition at line 105 of file ImplementMotor.cpp.

◆ getNumberOfMotors()

bool ImplementMotor::getNumberOfMotors ( int *  num)
overridevirtual

Get the number of available motors.

Parameters
numretrieved number of available motors
Returns
true/false

Implements yarp::dev::IMotor.

Definition at line 66 of file ImplementMotor.cpp.

◆ getTemperature()

bool ImplementMotor::getTemperature ( int  m,
double *  val 
)
overridevirtual

Get temperature of a motor.

Parameters
mmotor number
valretrieved motor temperature
Returns
true/false

Implements yarp::dev::IMotor.

Definition at line 72 of file ImplementMotor.cpp.

◆ getTemperatureLimit()

bool ImplementMotor::getTemperatureLimit ( int  m,
double *  temp 
)
overridevirtual

Retreives the current temperature limit for a specific motor.

The specific behavior of the motor when the temperature limit is exceeded depends on the implementation (power off recommended)

Parameters
mmotor number
tempthe current temperature limit.
Returns
true/false

Implements yarp::dev::IMotor.

Definition at line 83 of file ImplementMotor.cpp.

◆ getTemperatures()

bool ImplementMotor::getTemperatures ( double *  vals)
overridevirtual

Get temperature of all the motors.

Parameters
valspointer to an array containing all motor temperatures
Returns
true/false

Implements yarp::dev::IMotor.

Definition at line 127 of file ImplementMotor.cpp.

◆ initialize()

bool ImplementMotor::initialize ( int  size,
const int *  amap 
)
protected

Initialize the internal data and alloc memory.

Parameters
sizeis the number of controlled axes the driver deals with.
amapis a lookup table mapping axes onto physical drivers.
Returns
true if initialized succeeded, false if it wasn't executed, or assert.

Definition at line 31 of file ImplementMotor.cpp.

◆ setGearboxRatio()

bool ImplementMotor::setGearboxRatio ( int  m,
const double  val 
)
overridevirtual

Set the gearbox ratio for a specific motor.

Parameters
mmotor number
gearboxratio to be set
Returns
true/false

Reimplemented from yarp::dev::IMotor.

Definition at line 116 of file ImplementMotor.cpp.

◆ setTemperatureLimit()

bool ImplementMotor::setTemperatureLimit ( int  m,
const double  temp 
)
overridevirtual

Set the temperature limit for a specific motor.

The specific behavior of the motor when the temperature limit is exceeded depends on the implementation (power off recommended)

Parameters
mmotor number
tempthe temperature limit to be set
Returns
true/false

Implements yarp::dev::IMotor.

Definition at line 94 of file ImplementMotor.cpp.

◆ uninitialize()

bool ImplementMotor::uninitialize ( )
protected

Clean up internal data and memory.

Returns
true if uninitialization is executed, false otherwise.

Definition at line 49 of file ImplementMotor.cpp.

Member Data Documentation

◆ doubleBuffManager

yarp::dev::impl::FixedSizeBuffersManager<double>* yarp::dev::ImplementMotor::doubleBuffManager
protected

Definition at line 38 of file ImplementMotor.h.

◆ helper

void* yarp::dev::ImplementMotor::helper
protected

Definition at line 36 of file ImplementMotor.h.

◆ imotor

IMotorRaw* yarp::dev::ImplementMotor::imotor
protected

Definition at line 35 of file ImplementMotor.h.


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