14#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
19 intBuffManager(nullptr),
20 doubleBuffManager(nullptr)
yarp::dev::ControlBoardHelper * castToMapper(void *p)
void ampereA2S(double ampere, int j, double &sens, int &k)
void ampereS2A(const double *sens, double *ampere)
Interface for control boards implementing current control.
virtual bool getNumberOfMotorsRaw(int *number)=0
Retrieves the number of controlled motors from the current physical interface.
virtual bool setRefCurrentsRaw(const double *currs)=0
Set the reference value of the currents for all motors.
virtual bool getCurrentRangesRaw(double *min, double *max)=0
Get the full scale of the current measurements for all motors motor (e.g.
virtual bool getCurrentsRaw(double *currs)=0
Get the instantaneous current measurement for all motors.
virtual bool getRefCurrentsRaw(double *currs)=0
Get the reference value of the currents for all motors.
virtual bool getCurrentRaw(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual bool setRefCurrentRaw(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual bool getCurrentRangeRaw(int m, double *min, double *max)=0
Get the full scale of the current measurement for a given motor (e.g.
virtual bool getRefCurrentRaw(int m, double *curr)=0
Get the reference value of the current for a single motor.
bool getCurrentRanges(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
bool getCurrents(double *t) override
Get the instantaneous current measurement for all motors.
ImplementCurrentControl(yarp::dev::ICurrentControlRaw *y)
bool getCurrent(int j, double *t) override
Get the instantaneous current measurement for a single motor.
bool uninitialize()
Clean up internal data and memory.
bool getRefCurrents(double *t) override
Get the reference value of the currents for all motors.
bool getRefCurrent(int j, double *) override
Get the reference value of the current for a single motor.
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
bool setRefCurrents(const double *t) override
Set the reference value of the currents for all motors.
bool getCurrentRange(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
bool getNumberOfMotors(int *ax) override
Retrieves the number of controlled axes from the current physical interface.
yarp::dev::ICurrentControlRaw * iCurrentRaw
bool initialize(int size, const int *amap, const double *ampsToSens)
Initialize the internal data and alloc memory.
virtual ~ImplementCurrentControl()
Destructor.
bool setRefCurrent(int j, double t) override
Set the reference value of the current for a single motor.
Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::...
A manager of fixed size buffers in multi-thread environment.
Buffer< T > getBuffer()
Get a buffer and fill its information in @buffer.
void releaseBuffer(Buffer< T > &buffer)
Release a buffer.
A mini-server for performing network communication in the background.
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.