YARP
Yet Another Robot Platform
ControlBoardWrapperMotorEncoders Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperMotorEncoders.h>

+ Inheritance diagram for ControlBoardWrapperMotorEncoders:

Public Member Functions

bool getNumberOfMotorEncoders (int *num) override
 Get the number of available motor encoders. More...
 
bool resetMotorEncoder (int m) override
 Reset motor encoder, single motor. More...
 
bool resetMotorEncoders () override
 Reset motor encoders. More...
 
bool setMotorEncoderCountsPerRevolution (int m, const double cpr) override
 Sets number of counts per revolution for motor encoder m. More...
 
bool getMotorEncoderCountsPerRevolution (int m, double *cpr) override
 Gets number of counts per revolution for motor encoder m. More...
 
bool setMotorEncoder (int m, const double val) override
 Set the value of the motor encoder for a given motor. More...
 
bool setMotorEncoders (const double *vals) override
 Set the value of all motor encoders. More...
 
bool getMotorEncoder (int m, double *v) override
 Read the value of a motor encoder. More...
 
bool getMotorEncoders (double *encs) override
 Read the position of all motor encoders. More...
 
bool getMotorEncodersTimed (double *encs, double *t) override
 Read the instantaneous position of all motor encoders. More...
 
bool getMotorEncoderTimed (int m, double *v, double *t) override
 Read the instantaneous position of a motor encoder. More...
 
bool getMotorEncoderSpeed (int m, double *sp) override
 Read the istantaneous speed of a motor encoder. More...
 
bool getMotorEncoderSpeeds (double *spds) override
 Read the instantaneous speed of all motor encoders. More...
 
bool getMotorEncoderAcceleration (int m, double *acc) override
 Read the instantaneous acceleration of a motor encoder. More...
 
bool getMotorEncoderAccelerations (double *accs) override
 Read the instantaneous acceleration of all motor encoders. 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::IMotorEncoders
virtual ~IMotorEncoders ()
 Destructor. More...
 

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 16 of file ControlBoardWrapperMotorEncoders.h.

Member Function Documentation

◆ getMotorEncoder()

bool ControlBoardWrapperMotorEncoders::getMotorEncoder ( int  m,
double *  v 
)
overridevirtual

Read the value of a motor encoder.

Parameters
mmotor encoder number
vpointer to storage for the return value
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 128 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderAcceleration()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderAcceleration ( int  m,
double *  acc 
)
overridevirtual

Read the instantaneous acceleration of a motor encoder.

Parameters
mmotor number
accpointer to the array that will contain the output
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 267 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderAccelerations()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderAccelerations ( double *  accs)
overridevirtual

Read the instantaneous acceleration of all motor encoders.

Parameters
accspointer to the array that will contain the output
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 285 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderCountsPerRevolution()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderCountsPerRevolution ( int  m,
double *  cpr 
)
overridevirtual

Gets number of counts per revolution for motor encoder m.

Parameters
mmotor number
cprvals pointer to the new value
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 110 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoders()

bool ControlBoardWrapperMotorEncoders::getMotorEncoders ( double *  encs)
overridevirtual

Read the position of all motor encoders.

Parameters
encspointer to the array that will contain the output
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 146 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderSpeed()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderSpeed ( int  m,
double *  sp 
)
overridevirtual

Read the istantaneous speed of a motor encoder.

Parameters
mmotor number
sppointer to storage for the output
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 222 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderSpeeds()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderSpeeds ( double *  spds)
overridevirtual

Read the instantaneous speed of all motor encoders.

Parameters
spdspointer to storage for the output values
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 240 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncodersTimed()

bool ControlBoardWrapperMotorEncoders::getMotorEncodersTimed ( double *  encs,
double *  time 
)
overridevirtual

Read the instantaneous position of all motor encoders.

Parameters
encspointer to the array that will contain the output
timepointer to the array that will contain individual timestamps
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 174 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getMotorEncoderTimed()

bool ControlBoardWrapperMotorEncoders::getMotorEncoderTimed ( int  m,
double *  encs,
double *  time 
)
overridevirtual

Read the instantaneous position of a motor encoder.

Parameters
mmotor index
encsencoder value (pointer to)
timecorresponding timestamp (pointer to)
Returns
true if successful, false otherwise.

Implements yarp::dev::IMotorEncoders.

Definition at line 204 of file ControlBoardWrapperMotorEncoders.cpp.

◆ getNumberOfMotorEncoders()

bool ControlBoardWrapperMotorEncoders::getNumberOfMotorEncoders ( int *  num)
overridevirtual

Get the number of available motor encoders.

Parameters
mpointer to a value representing the number of available motor encoders.
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 312 of file ControlBoardWrapperMotorEncoders.cpp.

◆ resetMotorEncoder()

bool ControlBoardWrapperMotorEncoders::resetMotorEncoder ( int  m)
overridevirtual

Reset motor encoder, single motor.

Set the encoder value to zero.

Parameters
mmotor number
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 13 of file ControlBoardWrapperMotorEncoders.cpp.

◆ resetMotorEncoders()

bool ControlBoardWrapperMotorEncoders::resetMotorEncoders ( )
overridevirtual

Reset motor encoders.

Set the motor encoders value to zero.

Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 30 of file ControlBoardWrapperMotorEncoders.cpp.

◆ setMotorEncoder()

bool ControlBoardWrapperMotorEncoders::setMotorEncoder ( int  m,
const double  val 
)
overridevirtual

Set the value of the motor encoder for a given motor.

Parameters
mmotor number
valnew value
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 53 of file ControlBoardWrapperMotorEncoders.cpp.

◆ setMotorEncoderCountsPerRevolution()

bool ControlBoardWrapperMotorEncoders::setMotorEncoderCountsPerRevolution ( int  m,
const double  cpr 
)
overridevirtual

Sets number of counts per revolution for motor encoder m.

Parameters
mmotor number
cprnew value
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 93 of file ControlBoardWrapperMotorEncoders.cpp.

◆ setMotorEncoders()

bool ControlBoardWrapperMotorEncoders::setMotorEncoders ( const double *  vals)
overridevirtual

Set the value of all motor encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IMotorEncoders.

Definition at line 70 of file ControlBoardWrapperMotorEncoders.cpp.


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