YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::IPWMControl Class Referenceabstract

Interface for controlling an axis, by sending directly a PWM reference signal to a motor. More...

#include <yarp/dev/IPWMControl.h>

+ Inheritance diagram for yarp::dev::IPWMControl:

Public Member Functions

virtual ~IPWMControl ()
 
virtual yarp::dev::ReturnValue getNumberOfMotors (int *number)=0
 Retrieves the number of controlled motors from the current physical interface.
 
virtual yarp::dev::ReturnValue setRefDutyCycle (int m, double ref)=0
 Sets the reference dutycycle to a single motor.
 
virtual yarp::dev::ReturnValue setRefDutyCycles (const double *refs)=0
 Sets the reference dutycycle for all the motors.
 
virtual yarp::dev::ReturnValue getRefDutyCycle (int m, double *ref)=0
 Gets the last reference sent using the setRefDutyCycle function.
 
virtual yarp::dev::ReturnValue getRefDutyCycles (double *refs)=0
 Gets the last reference sent using the setRefDutyCycles function.
 
virtual yarp::dev::ReturnValue getDutyCycle (int m, double *val)=0
 Gets the current dutycycle of the output of the amplifier (i.e.
 
virtual yarp::dev::ReturnValue getDutyCycles (double *vals)=0
 Gets the current dutycycle of the output of the amplifier (i.e.
 

Detailed Description

Interface for controlling an axis, by sending directly a PWM reference signal to a motor.

Definition at line 23 of file IPWMControl.h.

Constructor & Destructor Documentation

◆ ~IPWMControl()

virtual yarp::dev::IPWMControl::~IPWMControl ( )
inlinevirtual

Definition at line 26 of file IPWMControl.h.

Member Function Documentation

◆ getDutyCycle()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::getDutyCycle ( int  m,
double *  val 
)
pure virtual

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

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPWMControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getDutyCycles()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::getDutyCycles ( double *  vals)
pure virtual

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

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPWMControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getNumberOfMotors()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::getNumberOfMotors ( int *  number)
pure virtual

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

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

Implemented in yarp::dev::ImplementPWMControl, yarp::dev::xHandControlBoard, ControlBoardRemappingEngine, and ControlBoard_nwc_yarp.

◆ getRefDutyCycle()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::getRefDutyCycle ( int  m,
double *  ref 
)
pure virtual

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

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPWMControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ getRefDutyCycles()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::getRefDutyCycles ( double *  refs)
pure virtual

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

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementPWMControl.

◆ setRefDutyCycle()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::setRefDutyCycle ( int  m,
double  ref 
)
pure virtual

Sets the reference dutycycle to a single motor.

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

Implemented in ControlBoard_nwc_yarp, yarp::dev::ImplementPWMControl, yarp::dev::xHandControlBoard, and ControlBoardRemappingEngine.

◆ setRefDutyCycles()

virtual yarp::dev::ReturnValue yarp::dev::IPWMControl::setRefDutyCycles ( const double *  refs)
pure virtual

Sets the reference dutycycle for all the motors.

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

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementPWMControl.


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