YARP
Yet Another Robot Platform
ControlBoardWrapperEncodersTimed Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperEncodersTimed.h>

+ Inheritance diagram for ControlBoardWrapperEncodersTimed:

Public Member Functions

bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool resetEncoder (int j) override
 Reset encoder, single joint. More...
 
bool resetEncoders () override
 Reset encoders. More...
 
bool setEncoder (int j, double val) override
 Set the value of the encoder for a given joint. More...
 
bool setEncoders (const double *vals) override
 Set the value of all encoders. More...
 
bool getEncoder (int j, double *v) override
 Read the value of an encoder. More...
 
bool getEncoders (double *encs) override
 Read the position of all axes. More...
 
bool getEncoderSpeed (int j, double *sp) override
 Read the istantaneous speed of an axis. More...
 
bool getEncoderSpeeds (double *spds) override
 Read the instantaneous speed of all axes. More...
 
bool getEncoderAcceleration (int j, double *acc) override
 Read the instantaneous acceleration of an axis. More...
 
bool getEncoderAccelerations (double *accs) override
 Read the instantaneous acceleration of all axes. More...
 
bool getEncodersTimed (double *encs, double *t) override
 Read the instantaneous acceleration of all axes. More...
 
bool getEncoderTimed (int j, double *v, double *t) override
 Read the instantaneous acceleration of all axes. 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::IEncodersTimed
virtual ~IEncodersTimed ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::IEncoders
virtual ~IEncoders ()
 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 ControlBoardWrapperEncodersTimed.h.

Member Function Documentation

◆ getAxes()

bool ControlBoardWrapperEncodersTimed::getAxes ( int *  ax)
inlineoverridevirtual

Get the number of controlled axes.

This command asks the number of controlled axes for the current physical interface.

Returns
the number of controlled axes.

Implements yarp::dev::IEncoders.

Definition at line 21 of file ControlBoardWrapperEncodersTimed.h.

◆ getEncoder()

bool ControlBoardWrapperEncodersTimed::getEncoder ( int  j,
double *  v 
)
overridevirtual

Read the value of an encoder.

Parameters
jencoder number
vpointer to storage for the return value
Returns
true/false, upon success/failure (you knew it, uh?)

Implements yarp::dev::IEncoders.

Definition at line 105 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoderAcceleration()

bool ControlBoardWrapperEncodersTimed::getEncoderAcceleration ( int  j,
double *  spds 
)
overridevirtual

Read the instantaneous acceleration of an axis.

Parameters
jaxis number
spdspointer to the array that will contain the output

Implements yarp::dev::IEncoders.

Definition at line 261 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoderAccelerations()

bool ControlBoardWrapperEncodersTimed::getEncoderAccelerations ( double *  accs)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
accspointer to the array that will contain the output
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncoders.

Definition at line 285 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoders()

bool ControlBoardWrapperEncodersTimed::getEncoders ( double *  encs)
overridevirtual

Read the position of all axes.

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

Implements yarp::dev::IEncoders.

Definition at line 129 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoderSpeed()

bool ControlBoardWrapperEncodersTimed::getEncoderSpeed ( int  j,
double *  sp 
)
overridevirtual

Read the istantaneous speed of an axis.

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

Implements yarp::dev::IEncoders.

Definition at line 210 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoderSpeeds()

bool ControlBoardWrapperEncodersTimed::getEncoderSpeeds ( double *  spds)
overridevirtual

Read the instantaneous speed of all axes.

Parameters
spdspointer to storage for the output values
Returns
guess what? (true/false on success or failure).

Implements yarp::dev::IEncoders.

Definition at line 234 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncodersTimed()

bool ControlBoardWrapperEncodersTimed::getEncodersTimed ( double *  encs,
double *  time 
)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
encspointer to the array that will contain the output
timepointer to the array that will contain individual timestamps
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 156 of file ControlBoardWrapperEncodersTimed.cpp.

◆ getEncoderTimed()

bool ControlBoardWrapperEncodersTimed::getEncoderTimed ( int  j,
double *  encs,
double *  time 
)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
jaxis index
encsencoder value (pointer to)
timecorresponding timestamp (pointer to)
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 186 of file ControlBoardWrapperEncodersTimed.cpp.

◆ resetEncoder()

bool ControlBoardWrapperEncodersTimed::resetEncoder ( int  j)
overridevirtual

Reset encoder, single joint.

Set the encoder value to zero

Parameters
jencoder number
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 13 of file ControlBoardWrapperEncodersTimed.cpp.

◆ resetEncoders()

bool ControlBoardWrapperEncodersTimed::resetEncoders ( )
overridevirtual

Reset encoders.

Set the encoders value to zero

Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 36 of file ControlBoardWrapperEncodersTimed.cpp.

◆ setEncoder()

bool ControlBoardWrapperEncodersTimed::setEncoder ( int  j,
double  val 
)
overridevirtual

Set the value of the encoder for a given joint.

Parameters
jencoder number
valnew value
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 59 of file ControlBoardWrapperEncodersTimed.cpp.

◆ setEncoders()

bool ControlBoardWrapperEncodersTimed::setEncoders ( const double *  vals)
overridevirtual

Set the value of all encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 82 of file ControlBoardWrapperEncodersTimed.cpp.


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