YARP
Yet Another Robot Platform
ControlBoardWrapperPWMControl Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperPWMControl.h>

+ Inheritance diagram for ControlBoardWrapperPWMControl:

Public Member Functions

bool getNumberOfMotors (int *num) 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 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::IPWMControl
virtual ~IPWMControl ()
 

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 17 of file ControlBoardWrapperPWMControl.h.

Member Function Documentation

◆ getDutyCycle()

bool ControlBoardWrapperPWMControl::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 106 of file ControlBoardWrapperPWMControl.cpp.

◆ getDutyCycles()

bool ControlBoardWrapperPWMControl::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 128 of file ControlBoardWrapperPWMControl.cpp.

◆ getNumberOfMotors()

bool ControlBoardWrapperPWMControl::getNumberOfMotors ( int *  number)
inlineoverridevirtual

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 22 of file ControlBoardWrapperPWMControl.h.

◆ getRefDutyCycle()

bool ControlBoardWrapperPWMControl::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 58 of file ControlBoardWrapperPWMControl.cpp.

◆ getRefDutyCycles()

bool ControlBoardWrapperPWMControl::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 80 of file ControlBoardWrapperPWMControl.cpp.

◆ setRefDutyCycle()

bool ControlBoardWrapperPWMControl::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 14 of file ControlBoardWrapperPWMControl.cpp.

◆ setRefDutyCycles()

bool ControlBoardWrapperPWMControl::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 36 of file ControlBoardWrapperPWMControl.cpp.


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