#include <yarp/dev/ImplementMotor.h>
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... | |
![]() | |
virtual | ~IMotor () |
Destructor. More... | |
virtual bool | getNumberOfMotors (int *num)=0 |
Get the number of available motors. More... | |
virtual bool | getTemperature (int m, double *val)=0 |
Get temperature of a motor. More... | |
virtual bool | getTemperatures (double *vals)=0 |
Get temperature of all the motors. More... | |
virtual bool | getTemperatureLimit (int m, double *temp)=0 |
Retreives the current temperature limit for a specific motor. More... | |
virtual bool | setTemperatureLimit (int m, const double temp)=0 |
Set the temperature limit for a specific motor. More... | |
virtual bool | getGearboxRatio (int m, double *val) |
Get the gearbox ratio for a specific motor. More... | |
virtual bool | setGearboxRatio (int m, const double val) |
Set the gearbox ratio for a specific motor. 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 | |
IMotorRaw * | imotor |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< double > * | doubleBuffManager |
Definition at line 23 of file ImplementMotor.h.
ImplementMotor::ImplementMotor | ( | yarp::dev::IMotorRaw * | y | ) |
Definition at line 17 of file ImplementMotor.cpp.
|
virtual |
Definition at line 23 of file ImplementMotor.cpp.
|
overridevirtual |
Get the gearbox ratio for a specific motor.
m | motor number |
val | retrieved gearbox ratio |
Reimplemented from yarp::dev::IMotor.
Definition at line 103 of file ImplementMotor.cpp.
|
overridevirtual |
Get the number of available motors.
num | retrieved number of available motors |
Implements yarp::dev::IMotor.
Definition at line 64 of file ImplementMotor.cpp.
|
overridevirtual |
Get temperature of a motor.
m | motor number |
val | retrieved motor temperature |
Implements yarp::dev::IMotor.
Definition at line 70 of file ImplementMotor.cpp.
|
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)
m | motor number |
temp | the current temperature limit. |
Implements yarp::dev::IMotor.
Definition at line 81 of file ImplementMotor.cpp.
|
overridevirtual |
Get temperature of all the motors.
vals | pointer to an array containing all motor temperatures |
Implements yarp::dev::IMotor.
Definition at line 125 of file ImplementMotor.cpp.
|
protected |
Initialize the internal data and alloc memory.
size | is the number of controlled axes the driver deals with. |
amap | is a lookup table mapping axes onto physical drivers. |
Definition at line 28 of file ImplementMotor.cpp.
|
overridevirtual |
Set the gearbox ratio for a specific motor.
m | motor number |
gearbox | ratio to be set |
Reimplemented from yarp::dev::IMotor.
Definition at line 114 of file ImplementMotor.cpp.
|
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)
m | motor number |
temp | the temperature limit to be set |
Implements yarp::dev::IMotor.
Definition at line 92 of file ImplementMotor.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 47 of file ImplementMotor.cpp.
|
protected |
Definition at line 29 of file ImplementMotor.h.
|
protected |
Definition at line 27 of file ImplementMotor.h.
|
protected |
Definition at line 26 of file ImplementMotor.h.