#include <yarp/dev/ImplementCurrentControl.h>
Public Member Functions | |
ImplementCurrentControl (yarp::dev::ICurrentControlRaw *y) | |
virtual | ~ImplementCurrentControl () |
Destructor. | |
bool | getNumberOfMotors (int *ax) override |
Retrieves the number of controlled axes from the current physical interface. | |
bool | getRefCurrent (int j, double *) override |
Get the reference value of the current for a single motor. | |
bool | getRefCurrents (double *t) override |
Get the reference value of the currents for all motors. | |
bool | setRefCurrents (const double *t) override |
Set the reference value of the currents for all motors. | |
bool | setRefCurrent (int j, double t) override |
Set the reference value of the current for a single motor. | |
bool | setRefCurrents (const int n_joint, const int *joints, const double *t) override |
Set the reference value of the current for a group of motors. | |
bool | getCurrents (double *t) override |
Get the instantaneous current measurement for all motors. | |
bool | getCurrent (int j, double *t) override |
Get the instantaneous current measurement for a single motor. | |
bool | getCurrentRange (int j, double *min, double *max) override |
Get the full scale of the current measurement for a given motor (e.g. | |
bool | getCurrentRanges (double *min, double *max) override |
Get the full scale of the current measurements for all motors motor (e.g. | |
Public Member Functions inherited from yarp::dev::ICurrentControl | |
virtual | ~ICurrentControl () |
Destructor. | |
Protected Member Functions | |
bool | initialize (int size, const int *amap, const double *ampsToSens) |
Initialize the internal data and alloc memory. | |
bool | uninitialize () |
Clean up internal data and memory. | |
Protected Attributes | |
yarp::dev::ICurrentControlRaw * | iCurrentRaw |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< int > * | intBuffManager |
yarp::dev::impl::FixedSizeBuffersManager< double > * | doubleBuffManager |
Definition at line 23 of file ImplementCurrentControl.h.
ImplementCurrentControl::ImplementCurrentControl | ( | yarp::dev::ICurrentControlRaw * | y | ) |
Definition at line 16 of file ImplementCurrentControl.cpp.
|
virtual |
Destructor.
Perform uninitialize if needed.
Definition at line 23 of file ImplementCurrentControl.cpp.
Get the instantaneous current measurement for a single motor.
m | motor number |
curr | pointer to the result value. Value is expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 144 of file ImplementCurrentControl.cpp.
Get the full scale of the current measurement for a given motor (e.g.
-20A +20A) Reference values set by user with methods such as setRefCurrent() should be in this range. This method is not related to the current overload protection methods belonging to the iAmplifierControl interface.
m | motor number |
min | minimum current of the motor m |
max | maximum current of the motor m |
Implements yarp::dev::ICurrentControl.
Definition at line 168 of file ImplementCurrentControl.cpp.
Get the full scale of the current measurements for all motors motor (e.g.
-20A +20A) Reference values set by user with methods such as setRefCurrent() should be in this range. This method is not related to the current overload protection methods belonging to the iAmplifierControl interface.
min | pointer to the array that will store minimum currents |
max | pointer to the array that will store maximum currents |
Implements yarp::dev::ICurrentControl.
Definition at line 156 of file ImplementCurrentControl.cpp.
Get the instantaneous current measurement for all motors.
currs | pointer to the array that will store the output. Values are expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 113 of file ImplementCurrentControl.cpp.
Retrieves the number of controlled axes from the current physical interface.
ax | returns the number of controlled axes. |
Implements yarp::dev::ICurrentControl.
Definition at line 69 of file ImplementCurrentControl.cpp.
Get the reference value of the current for a single motor.
m | motor number |
curr | the current reference value for motor m. Value is expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 74 of file ImplementCurrentControl.cpp.
Get the reference value of the currents for all motors.
currs | pointer to the array to be filled with reference current values. Values are expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 86 of file ImplementCurrentControl.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 ImplementCurrentControl.cpp.
Set the reference value of the current for a single motor.
m | motor number |
curr | the current reference value for motor m. Value is expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 104 of file ImplementCurrentControl.cpp.
Set the reference value of the currents for all motors.
currs | the array containing the reference current values. Values are expressed in amperes. |
Implements yarp::dev::ICurrentControl.
Definition at line 95 of file ImplementCurrentControl.cpp.
|
overridevirtual |
Set the reference value of the current for a group of motors.
n_motor | size of motors ans currs arrays |
motors | pointer to the array containing the list of motor numbers |
currs | pointer to the array specifying the new current references |
Implements yarp::dev::ICurrentControl.
Definition at line 122 of file ImplementCurrentControl.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 46 of file ImplementCurrentControl.cpp.
|
protected |
Definition at line 29 of file ImplementCurrentControl.h.
|
protected |
Definition at line 27 of file ImplementCurrentControl.h.
|
protected |
Definition at line 26 of file ImplementCurrentControl.h.
|
protected |
Definition at line 28 of file ImplementCurrentControl.h.