15#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
21 doubleBuffManager(nullptr)
26 if (helper !=
nullptr) {
34 yAssert (doubleBuffManager !=
nullptr);
46 if (helper !=
nullptr)
54 delete doubleBuffManager;
55 doubleBuffManager=
nullptr;
yarp::dev::ControlBoardHelper * castToMapper(void *p)
void dutycycle2PWM(double dutycycle, int j, double &pwm, int &k)
void PWM2dutycycle(const double *pwm, double *dutycycle)
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
virtual bool getDutyCycleRaw(int m, double *val)=0
Gets the current dutycycle of the output of the amplifier (i.e.
virtual bool setRefDutyCycleRaw(int m, double ref)=0
Sets the reference dutycycle of a single motor.
virtual bool getDutyCyclesRaw(double *vals)=0
Gets the current dutycycle of the output of the amplifier (i.e.
virtual bool getNumberOfMotorsRaw(int *number)=0
Retrieves the number of controlled motors from the current physical interface.
virtual bool setRefDutyCyclesRaw(const double *refs)=0
Sets the reference dutycycle for all motors.
virtual bool getRefDutyCyclesRaw(double *refs)=0
Gets the last reference sent using the setRefDutyCyclesRaw function.
virtual bool getRefDutyCycleRaw(int m, double *ref)=0
Gets the last reference sent using the setRefDutyCycleRaw function.
bool initialize(int k, const int *amap, const double *dutyToPWM)
bool getDutyCycle(int j, double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
bool getDutyCycles(double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
bool getNumberOfMotors(int *ax) override
Retrieves the number of controlled motors from the current physical interface.
bool getRefDutyCycle(int j, double *v) override
Gets the last reference sent using the setRefDutyCycle function.
ImplementPWMControl(IPWMControlRaw *v)
bool getRefDutyCycles(double *v) override
Gets the last reference sent using the setRefDutyCycles function.
bool setRefDutyCycles(const double *v) override
Sets the reference dutycycle for all the motors.
bool setRefDutyCycle(int j, double v) override
Sets the reference dutycycle to 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.