YARP
Yet Another Robot Platform
yarp::dev::ImplementPWMControl Class Reference

#include <yarp/dev/ImplementPWMControl.h>

+ Inheritance diagram for yarp::dev::ImplementPWMControl:

Public Member Functions

bool initialize (int k, const int *amap, const double *dutyToPWM)
 
bool uninitialize ()
 
 ImplementPWMControl (IPWMControlRaw *v)
 
 ~ImplementPWMControl ()
 
bool getNumberOfMotors (int *ax) override
 Retrieves the number of controlled motors from the current physical interface. More...
 
bool setRefDutyCycle (int j, double v) override
 Sets the reference dutycycle to a single motor. More...
 
bool setRefDutyCycles (const double *v) override
 Sets the reference dutycycle for all the motors. More...
 
bool getRefDutyCycle (int j, double *v) override
 Gets the last reference sent using the setRefDutyCycle function. More...
 
bool getRefDutyCycles (double *v) override
 Gets the last reference sent using the setRefDutyCycles function. More...
 
bool getDutyCycle (int j, double *v) override
 Gets the current dutycycle of the output of the amplifier (i.e. More...
 
bool getDutyCycles (double *v) override
 Gets the current dutycycle of the output of the amplifier (i.e. More...
 
- Public Member Functions inherited from yarp::dev::IPWMControl
virtual ~IPWMControl ()
 
virtual bool getNumberOfMotors (int *number)=0
 Retrieves the number of controlled motors from the current physical interface. More...
 
virtual bool setRefDutyCycle (int m, double ref)=0
 Sets the reference dutycycle to a single motor. More...
 
virtual bool setRefDutyCycles (const double *refs)=0
 Sets the reference dutycycle for all the motors. More...
 
virtual bool getRefDutyCycle (int m, double *ref)=0
 Gets the last reference sent using the setRefDutyCycle function. More...
 
virtual bool getRefDutyCycles (double *refs)=0
 Gets the last reference sent using the setRefDutyCycles function. More...
 
virtual bool getDutyCycle (int m, double *val)=0
 Gets the current dutycycle of the output of the amplifier (i.e. More...
 
virtual bool getDutyCycles (double *vals)=0
 Gets the current dutycycle of the output of the amplifier (i.e. More...
 

Detailed Description

Definition at line 25 of file ImplementPWMControl.h.

Constructor & Destructor Documentation

◆ ImplementPWMControl()

ImplementPWMControl::ImplementPWMControl ( IPWMControlRaw v)

Definition at line 18 of file ImplementPWMControl.cpp.

◆ ~ImplementPWMControl()

ImplementPWMControl::~ImplementPWMControl ( )

Definition at line 39 of file ImplementPWMControl.cpp.

Member Function Documentation

◆ getDutyCycle()

bool ImplementPWMControl::getDutyCycle ( int  m,
double *  val 
)
overridevirtual

Gets the current dutycycle of the output of the amplifier (i.e.

pwm value sent to the motor)

Parameters
mmotor number
valpointer to storage for return value, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 103 of file ImplementPWMControl.cpp.

◆ getDutyCycles()

bool ImplementPWMControl::getDutyCycles ( double *  vals)
overridevirtual

Gets the current dutycycle of the output of the amplifier (i.e.

pwm values sent to all motors)

Parameters
valspointer to the vector that will store the values, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 113 of file ImplementPWMControl.cpp.

◆ getNumberOfMotors()

bool ImplementPWMControl::getNumberOfMotors ( int *  number)
overridevirtual

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

Parameters
numberreturns the number of controlled motors.
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 61 of file ImplementPWMControl.cpp.

◆ getRefDutyCycle()

bool ImplementPWMControl::getRefDutyCycle ( int  m,
double *  ref 
)
overridevirtual

Gets the last reference sent using the setRefDutyCycle function.

Parameters
mmotor number
refpointer to storage for return value, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 84 of file ImplementPWMControl.cpp.

◆ getRefDutyCycles()

bool ImplementPWMControl::getRefDutyCycles ( double *  refs)
overridevirtual

Gets the last reference sent using the setRefDutyCycles function.

Parameters
refspointer to the vector that will store the values, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 94 of file ImplementPWMControl.cpp.

◆ initialize()

bool ImplementPWMControl::initialize ( int  k,
const int *  amap,
const double *  dutyToPWM 
)

Definition at line 24 of file ImplementPWMControl.cpp.

◆ setRefDutyCycle()

bool ImplementPWMControl::setRefDutyCycle ( int  m,
double  ref 
)
overridevirtual

Sets the reference dutycycle to a single motor.

Parameters
mmotor number
refthe dutycycle, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 66 of file ImplementPWMControl.cpp.

◆ setRefDutyCycles()

bool ImplementPWMControl::setRefDutyCycles ( const double *  refs)
overridevirtual

Sets the reference dutycycle for all the motors.

Parameters
refsthe dutycycle, expressed as percentage (-100% +100%)
Returns
true/false on success/failure

Implements yarp::dev::IPWMControl.

Definition at line 75 of file ImplementPWMControl.cpp.

◆ uninitialize()

bool ImplementPWMControl::uninitialize ( )

Definition at line 44 of file ImplementPWMControl.cpp.


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