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...
 

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 23 of file ImplementAmplifierControl.h.

Constructor & Destructor Documentation

◆ ImplementAmplifierControl()

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

Definition at line 21 of file ImplementAmplifierControl.cpp.

◆ ~ImplementAmplifierControl()

ImplementAmplifierControl::~ImplementAmplifierControl ( )
virtual

Destructor.

Perform uninitialize if needed.

Definition at line 29 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 74 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 67 of file ImplementAmplifierControl.cpp.

◆ getAmpStatus() [1/2]

bool ImplementAmplifierControl::getAmpStatus ( int *  st)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 97 of file ImplementAmplifierControl.cpp.

◆ getAmpStatus() [2/2]

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

Implements yarp::dev::IAmplifierControl.

Definition at line 105 of file ImplementAmplifierControl.cpp.

◆ getCurrent()

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

Implements yarp::dev::IAmplifierControl.

Definition at line 88 of file ImplementAmplifierControl.cpp.

◆ getCurrents()

bool ImplementAmplifierControl::getCurrents ( double *  vals)
overridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 81 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 121 of file ImplementAmplifierControl.cpp.

◆ getNominalCurrent()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 130 of file ImplementAmplifierControl.cpp.

◆ getPeakCurrent()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 142 of file ImplementAmplifierControl.cpp.

◆ getPowerSupplyVoltage()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 191 of file ImplementAmplifierControl.cpp.

◆ getPWM()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 170 of file ImplementAmplifierControl.cpp.

◆ getPWMLimit()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 177 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 34 of file ImplementAmplifierControl.cpp.

◆ setMaxCurrent()

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

Implements yarp::dev::IAmplifierControl.

Definition at line 113 of file ImplementAmplifierControl.cpp.

◆ setNominalCurrent()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 162 of file ImplementAmplifierControl.cpp.

◆ setPeakCurrent()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 154 of file ImplementAmplifierControl.cpp.

◆ setPWMLimit()

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

Reimplemented from yarp::dev::IAmplifierControl.

Definition at line 184 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 53 of file ImplementAmplifierControl.cpp.

Member Data Documentation

◆ dTemp

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

Definition at line 28 of file ImplementAmplifierControl.h.

◆ helper

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

Definition at line 27 of file ImplementAmplifierControl.h.

◆ iAmplifier

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

Definition at line 26 of file ImplementAmplifierControl.h.

◆ iTemp

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

Definition at line 29 of file ImplementAmplifierControl.h.


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