YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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.
 
bool getTemperature (int m, double *val) override
 Get temperature of a motor.
 
bool getTemperatures (double *vals) override
 Get temperature of all the motors.
 
bool getTemperatureLimit (int m, double *val) override
 Retreives the current temperature limit for a specific motor.
 
bool setTemperatureLimit (int m, const double val) override
 Set the temperature limit for a specific motor.
 
bool getGearboxRatio (int m, double *val) override
 Get the gearbox ratio for a specific motor.
 
bool setGearboxRatio (int m, const double val) override
 Set the gearbox ratio for a specific motor.
 
- Public Member Functions inherited from yarp::dev::IMotor
virtual ~IMotor ()
 Destructor.
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 23 of file ImplementMotor.h.

Constructor & Destructor Documentation

◆ ImplementMotor()

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

Definition at line 17 of file ImplementMotor.cpp.

◆ ~ImplementMotor()

ImplementMotor::~ImplementMotor ( )
virtual

Definition at line 23 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 103 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 64 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 70 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 81 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 125 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 28 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 114 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 92 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 47 of file ImplementMotor.cpp.

Member Data Documentation

◆ doubleBuffManager

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

Definition at line 29 of file ImplementMotor.h.

◆ helper

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

Definition at line 27 of file ImplementMotor.h.

◆ imotor

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

Definition at line 26 of file ImplementMotor.h.


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