YARP
Yet Another Robot Platform
ControlBoardWrapperCurrentControl Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperCurrentControl.h>

+ Inheritance diagram for ControlBoardWrapperCurrentControl:

Public Member Functions

bool getNumberOfMotors (int *num) override
 Retrieves the number of controlled axes from the current physical interface. More...
 
bool getCurrent (int m, double *curr) override
 Get the instantaneous current measurement for a single motor. More...
 
bool getCurrents (double *currs) override
 Get the instantaneous current measurement for all motors. More...
 
bool getCurrentRange (int j, double *min, double *max) override
 Get the full scale of the current measurement for a given motor (e.g. More...
 
bool getCurrentRanges (double *min, double *max) override
 Get the full scale of the current measurements for all motors motor (e.g. More...
 
bool setRefCurrents (const double *t) override
 Set the reference value of the currents for all motors. More...
 
bool setRefCurrent (int j, double t) override
 Set the reference value of the current for a single motor. More...
 
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. More...
 
bool getRefCurrents (double *t) override
 Get the reference value of the currents for all motors. More...
 
bool getRefCurrent (int j, double *t) override
 Get the reference value of the current for a single motor. More...
 
- Public Member Functions inherited from ControlBoardWrapperCommon
bool getAxes (int *ax)
 
bool setRefAcceleration (int j, double acc)
 
bool setRefAccelerations (const double *accs)
 
bool setRefAccelerations (const int n_joints, const int *joints, const double *accs)
 
bool getRefAcceleration (int j, double *acc)
 
bool getRefAccelerations (double *accs)
 
bool getRefAccelerations (const int n_joints, const int *joints, double *accs)
 
bool stop (int j)
 
bool stop ()
 
bool stop (const int n_joint, const int *joints)
 
bool getNumberOfMotors (int *num)
 
bool getCurrent (int m, double *curr)
 
bool getCurrents (double *currs)
 
void printError (const std::string &func_name, const std::string &info, bool result)
 
- Public Member Functions inherited from yarp::dev::ICurrentControl
virtual ~ICurrentControl ()
 Destructor. More...
 
virtual bool getNumberOfMotors (int *ax)=0
 Retrieves the number of controlled axes from the current physical interface. More...
 
virtual bool getCurrent (int m, double *curr)=0
 Get the instantaneous current measurement for a single motor. More...
 
virtual bool getCurrents (double *currs)=0
 Get the instantaneous current measurement for all motors. More...
 
virtual bool getCurrentRange (int m, double *min, double *max)=0
 Get the full scale of the current measurement for a given motor (e.g. More...
 
virtual bool getCurrentRanges (double *min, double *max)=0
 Get the full scale of the current measurements for all motors motor (e.g. More...
 
virtual bool setRefCurrents (const double *currs)=0
 Set the reference value of the currents for all motors. More...
 
virtual bool setRefCurrent (int m, double curr)=0
 Set the reference value of the current for a single motor. More...
 
virtual bool setRefCurrents (const int n_motor, const int *motors, const double *currs)=0
 Set the reference value of the current for a group of motors. More...
 
virtual bool getRefCurrents (double *currs)=0
 Get the reference value of the currents for all motors. More...
 
virtual bool getRefCurrent (int m, double *curr)=0
 Get the reference value of the current for a single motor. More...
 

Additional Inherited Members

- Public Attributes inherited from ControlBoardWrapperCommon
WrappedDevice device
 
size_t controlledJoints {0}
 
std::string partName
 
std::mutex rpcDataMutex
 
MultiJointData rpcData
 
std::mutex timeMutex
 
yarp::os::Stamp time
 

Detailed Description

Definition at line 13 of file ControlBoardWrapperCurrentControl.h.

Member Function Documentation

◆ getCurrent()

bool ControlBoardWrapperCurrentControl::getCurrent ( int  m,
double *  curr 
)
inlineoverridevirtual

Get the instantaneous current measurement for a single motor.

Parameters
mmotor number
currpointer to the result value. Value is expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 19 of file ControlBoardWrapperCurrentControl.h.

◆ getCurrentRange()

bool ControlBoardWrapperCurrentControl::getCurrentRange ( int  m,
double *  min,
double *  max 
)
overridevirtual

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.

Parameters
mmotor number
minminimum current of the motor m
maxmaximum current of the motor m
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 11 of file ControlBoardWrapperCurrentControl.cpp.

◆ getCurrentRanges()

bool ControlBoardWrapperCurrentControl::getCurrentRanges ( double *  min,
double *  max 
)
overridevirtual

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.

Parameters
minpointer to the array that will store minimum currents
maxpointer to the array that will store maximum currents
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 34 of file ControlBoardWrapperCurrentControl.cpp.

◆ getCurrents()

bool ControlBoardWrapperCurrentControl::getCurrents ( double *  currs)
inlineoverridevirtual

Get the instantaneous current measurement for all motors.

Parameters
currspointer to the array that will store the output. Values are expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 20 of file ControlBoardWrapperCurrentControl.h.

◆ getNumberOfMotors()

bool ControlBoardWrapperCurrentControl::getNumberOfMotors ( int *  ax)
inlineoverridevirtual

Retrieves the number of controlled axes from the current physical interface.

Parameters
axreturns the number of controlled axes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 18 of file ControlBoardWrapperCurrentControl.h.

◆ getRefCurrent()

bool ControlBoardWrapperCurrentControl::getRefCurrent ( int  m,
double *  curr 
)
overridevirtual

Get the reference value of the current for a single motor.

Parameters
mmotor number
currthe current reference value for motor m. Value is expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 162 of file ControlBoardWrapperCurrentControl.cpp.

◆ getRefCurrents()

bool ControlBoardWrapperCurrentControl::getRefCurrents ( double *  currs)
overridevirtual

Get the reference value of the currents for all motors.

Parameters
currspointer to the array to be filled with reference current values. Values are expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 136 of file ControlBoardWrapperCurrentControl.cpp.

◆ setRefCurrent()

bool ControlBoardWrapperCurrentControl::setRefCurrent ( int  m,
double  curr 
)
overridevirtual

Set the reference value of the current for a single motor.

Parameters
mmotor number
currthe current reference value for motor m. Value is expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 85 of file ControlBoardWrapperCurrentControl.cpp.

◆ setRefCurrents() [1/2]

bool ControlBoardWrapperCurrentControl::setRefCurrents ( const double *  currs)
overridevirtual

Set the reference value of the currents for all motors.

Parameters
currsthe array containing the reference current values. Values are expressed in amperes.
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 63 of file ControlBoardWrapperCurrentControl.cpp.

◆ setRefCurrents() [2/2]

bool ControlBoardWrapperCurrentControl::setRefCurrents ( const int  n_motor,
const int *  motors,
const double *  currs 
)
overridevirtual

Set the reference value of the current for a group of motors.

Parameters
n_motorsize of motors ans currs arrays
motorspointer to the array containing the list of motor numbers
currspointer to the array specifying the new current references
Returns
true/false on success/failure

Implements yarp::dev::ICurrentControl.

Definition at line 107 of file ControlBoardWrapperCurrentControl.cpp.


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