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

#include <yarp/dev/ImplementAmplifierControl.h>

+ Inheritance diagram for yarp::dev::ImplementAmplifierControl:

Public Member Functions

 ImplementAmplifierControl (yarp::dev::IAmplifierControlRaw *y)
 
virtual ~ImplementAmplifierControl ()
 Destructor. More...
 
bool enableAmp (int j) override
 Enable the amplifier on a specific joint. More...
 
bool disableAmp (int j) override
 Disable the amplifier on a specific joint. More...
 
bool getAmpStatus (int *st) override
 
bool getAmpStatus (int j, int *st) override
 
bool getCurrents (double *vals) override
 
bool getCurrent (int j, double *val) override
 
bool setMaxCurrent (int j, double v) override
 
bool getMaxCurrent (int j, double *v) override
 Returns the maximum electric current allowed for a given motor. More...
 
bool getNominalCurrent (int m, double *val) override
 
bool setNominalCurrent (int m, const double val) override
 
bool getPeakCurrent (int m, double *val) override
 
bool setPeakCurrent (int m, const double val) override
 
bool getPWM (int j, double *val) override
 
bool getPWMLimit (int j, double *val) override
 
bool setPWMLimit (int j, const double val) override
 
bool getPowerSupplyVoltage (int j, double *val) override
 
- Public Member Functions inherited from yarp::dev::IAmplifierControl
virtual ~IAmplifierControl ()
 Destructor. More...
 
virtual bool enableAmp (int j)=0
 Enable the amplifier on a specific joint. More...
 
virtual bool disableAmp (int j)=0
 Disable the amplifier on a specific joint. More...
 
virtual bool getAmpStatus (int *st)=0
 
virtual bool getAmpStatus (int j, int *v)=0
 
virtual bool getCurrents (double *vals)=0
 
virtual bool getCurrent (int j, double *val)=0
 
virtual bool getMaxCurrent (int j, double *v)=0
 Returns the maximum electric current allowed for a given motor. More...
 
virtual bool setMaxCurrent (int j, double v)=0
 
virtual bool getNominalCurrent (int m, double *val)
 
virtual bool setNominalCurrent (int m, const double val)
 
virtual bool getPeakCurrent (int m, double *val)
 
virtual bool setPeakCurrent (int m, const double val)
 
virtual bool getPWM (int j, double *val)
 
virtual bool getPWMLimit (int j, double *val)
 
virtual bool setPWMLimit (int j, const double val)
 
virtual bool getPowerSupplyVoltage (int j, double *val)
 

Protected Member Functions

bool initialize (int size, const int *amap, const double *enc, const double *zos, const double *ampereFactor=NULL, const double *voltFactor=NULL)
 Initialize the internal data and alloc memory. More...
 
bool uninitialize ()
 Clean up internal data and memory. More...
 

Protected Attributes

IAmplifierControlRawiAmplifier
 
void * helper
 
double * dTemp
 
int * iTemp
 

Detailed Description

Definition at line 16 of file ImplementAmplifierControl.h.

Constructor & Destructor Documentation

◆ ImplementAmplifierControl()

ImplementAmplifierControl::ImplementAmplifierControl ( yarp::dev::IAmplifierControlRaw y)

Definition at line 18 of file ImplementAmplifierControl.cpp.

◆ ~ImplementAmplifierControl()

ImplementAmplifierControl::~ImplementAmplifierControl ( )
virtual

Destructor.

Perform uninitialize if needed.

Definition at line 26 of file ImplementAmplifierControl.cpp.

Member Function Documentation

◆ disableAmp()

bool ImplementAmplifierControl::disableAmp ( int  j)
overridevirtual

Disable the amplifier on a specific joint.

All computations within the board will be carried out normally, but the output will be disabled.

Returns
true/false on success/failure

Implements yarp::dev::IAmplifierControl.

Definition at line 73 of file ImplementAmplifierControl.cpp.

◆ enableAmp()

bool ImplementAmplifierControl::enableAmp ( int  j)
overridevirtual

Enable the amplifier on a specific joint.

Be careful, check that the output of the controller is appropriate (usually zero), to avoid generating abrupt movements.

Returns
true/false on success/failure

Implements yarp::dev::IAmplifierControl.

Definition at line 66 of file ImplementAmplifierControl.cpp.

◆ getAmpStatus() [1/2]

bool ImplementAmplifierControl::getAmpStatus ( int *  st)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 96 of file ImplementAmplifierControl.cpp.

◆ getAmpStatus() [2/2]

bool ImplementAmplifierControl::getAmpStatus ( int  j,
int *  st 
)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 104 of file ImplementAmplifierControl.cpp.

◆ getCurrent()

bool ImplementAmplifierControl::getCurrent ( int  j,
double *  val 
)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 87 of file ImplementAmplifierControl.cpp.

◆ getCurrents()

bool ImplementAmplifierControl::getCurrents ( double *  vals)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 80 of file ImplementAmplifierControl.cpp.

◆ getMaxCurrent()

bool ImplementAmplifierControl::getMaxCurrent ( int  j,
double *  v 
)
overridevirtual

Returns the maximum electric current allowed for a given motor.

The behavior of the board/amplifier when this limit is reached depends on the implementation.

Parameters
jmotor number
vthe return value
Returns
probably true, might return false in bad times

Implements yarp::dev::IAmplifierControl.

Definition at line 120 of file ImplementAmplifierControl.cpp.

◆ getNominalCurrent()

bool ImplementAmplifierControl::getNominalCurrent ( int  m,
double *  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 129 of file ImplementAmplifierControl.cpp.

◆ getPeakCurrent()

bool ImplementAmplifierControl::getPeakCurrent ( int  m,
double *  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 141 of file ImplementAmplifierControl.cpp.

◆ getPowerSupplyVoltage()

bool ImplementAmplifierControl::getPowerSupplyVoltage ( int  j,
double *  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 190 of file ImplementAmplifierControl.cpp.

◆ getPWM()

bool ImplementAmplifierControl::getPWM ( int  j,
double *  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 169 of file ImplementAmplifierControl.cpp.

◆ getPWMLimit()

bool ImplementAmplifierControl::getPWMLimit ( int  j,
double *  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 176 of file ImplementAmplifierControl.cpp.

◆ initialize()

bool ImplementAmplifierControl::initialize ( int  size,
const int *  amap,
const double *  enc,
const double *  zos,
const double *  ampereFactor = NULL,
const double *  voltFactor = NULL 
)
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.
encis an array containing the encoder to angles conversion factors.
zosis an array containing the zeros of the encoders.
Returns
true if initialized succeeded, false if it wasn't executed, or assert.

Definition at line 31 of file ImplementAmplifierControl.cpp.

◆ setMaxCurrent()

bool ImplementAmplifierControl::setMaxCurrent ( int  j,
double  v 
)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 112 of file ImplementAmplifierControl.cpp.

◆ setNominalCurrent()

bool ImplementAmplifierControl::setNominalCurrent ( int  m,
const double  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 161 of file ImplementAmplifierControl.cpp.

◆ setPeakCurrent()

bool ImplementAmplifierControl::setPeakCurrent ( int  m,
const double  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 153 of file ImplementAmplifierControl.cpp.

◆ setPWMLimit()

bool ImplementAmplifierControl::setPWMLimit ( int  j,
const double  val 
)
overridevirtual

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 183 of file ImplementAmplifierControl.cpp.

◆ uninitialize()

bool ImplementAmplifierControl::uninitialize ( )
protected

Clean up internal data and memory.

Returns
true if uninitialization is executed, false otherwise.

Definition at line 51 of file ImplementAmplifierControl.cpp.

Member Data Documentation

◆ dTemp

double* yarp::dev::ImplementAmplifierControl::dTemp
protected

Definition at line 21 of file ImplementAmplifierControl.h.

◆ helper

void* yarp::dev::ImplementAmplifierControl::helper
protected

Definition at line 20 of file ImplementAmplifierControl.h.

◆ iAmplifier

IAmplifierControlRaw* yarp::dev::ImplementAmplifierControl::iAmplifier
protected

Definition at line 19 of file ImplementAmplifierControl.h.

◆ iTemp

int* yarp::dev::ImplementAmplifierControl::iTemp
protected

Definition at line 22 of file ImplementAmplifierControl.h.


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