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

Stub implementation of IEncodersRaw interface. More...

#include <yarp/dev/ImplementControlBoardInterfaces.h>

+ Inheritance diagram for yarp::dev::StubImplEncodersRaw:

Public Member Functions

virtual ~StubImplEncodersRaw ()
 
bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool resetEncoderRaw (int j) override
 Reset encoder, single joint. More...
 
bool resetEncodersRaw () override
 Reset encoders. More...
 
bool setEncoderRaw (int j, double val) override
 Set the value of the encoder for a given joint. More...
 
bool setEncodersRaw (const double *vals) override
 Set the value of all encoders. More...
 
bool getEncoderRaw (int j, double *v) override
 Read the value of an encoder. More...
 
bool getEncodersRaw (double *encs) override
 Read the position of all axes. More...
 
bool getEncoderSpeedRaw (int j, double *sp) override
 Read the instantaneous speed of an axis. More...
 
bool getEncoderSpeedsRaw (double *spds) override
 Read the instantaneous acceleration of an axis. More...
 
bool getEncoderAccelerationRaw (int j, double *spds) override
 Read the instantaneous acceleration of an axis. More...
 
bool getEncoderAccelerationsRaw (double *accs) override
 Read the instantaneous acceleration of all axes. More...
 
- Public Member Functions inherited from yarp::dev::IEncodersRaw
virtual ~IEncodersRaw ()
 Destructor. More...
 

Detailed Description

Stub implementation of IEncodersRaw interface.

Inherit from this class if you want a stub implementation of methods in IPositionControlRaw. This class allows to gradually implement an interface; you just have to implement functions that are useful for the underlying device. Another way to see this class is as a means to convert compile time errors in runtime errors.

If you use this class please be aware that the device you are wrapping might not function properly because you missed to implement useful functionalities.

Definition at line 39 of file ImplementControlBoardInterfaces.h.

Constructor & Destructor Documentation

◆ ~StubImplEncodersRaw()

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

Definition at line 49 of file ImplementControlBoardInterfaces.h.

Member Function Documentation

◆ getAxes()

bool yarp::dev::StubImplEncodersRaw::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::IEncodersRaw.

Definition at line 51 of file ImplementControlBoardInterfaces.h.

◆ getEncoderAccelerationRaw()

bool yarp::dev::StubImplEncodersRaw::getEncoderAccelerationRaw ( int  j,
double *  spds 
)
inlineoverridevirtual

Read the instantaneous acceleration of an axis.

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

Implements yarp::dev::IEncodersRaw.

Definition at line 78 of file ImplementControlBoardInterfaces.h.

◆ getEncoderAccelerationsRaw()

bool yarp::dev::StubImplEncodersRaw::getEncoderAccelerationsRaw ( double *  accs)
inlineoverridevirtual

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::IEncodersRaw.

Definition at line 81 of file ImplementControlBoardInterfaces.h.

◆ getEncoderRaw()

bool yarp::dev::StubImplEncodersRaw::getEncoderRaw ( int  j,
double *  v 
)
inlineoverridevirtual

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::IEncodersRaw.

Definition at line 66 of file ImplementControlBoardInterfaces.h.

◆ getEncoderSpeedRaw()

bool yarp::dev::StubImplEncodersRaw::getEncoderSpeedRaw ( int  j,
double *  sp 
)
inlineoverridevirtual

Read the instantaneous speed of an axis.

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

Implements yarp::dev::IEncodersRaw.

Definition at line 72 of file ImplementControlBoardInterfaces.h.

◆ getEncoderSpeedsRaw()

bool yarp::dev::StubImplEncodersRaw::getEncoderSpeedsRaw ( double *  spds)
inlineoverridevirtual

Read the instantaneous acceleration of an axis.

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

Implements yarp::dev::IEncodersRaw.

Definition at line 75 of file ImplementControlBoardInterfaces.h.

◆ getEncodersRaw()

bool yarp::dev::StubImplEncodersRaw::getEncodersRaw ( double *  encs)
inlineoverridevirtual

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::IEncodersRaw.

Definition at line 69 of file ImplementControlBoardInterfaces.h.

◆ resetEncoderRaw()

bool yarp::dev::StubImplEncodersRaw::resetEncoderRaw ( int  j)
inlineoverridevirtual

Reset encoder, single joint.

Set the encoder value to zero

Parameters
jencoder number
Returns
true/false

Implements yarp::dev::IEncodersRaw.

Definition at line 54 of file ImplementControlBoardInterfaces.h.

◆ resetEncodersRaw()

bool yarp::dev::StubImplEncodersRaw::resetEncodersRaw ( )
inlineoverridevirtual

Reset encoders.

Set the encoders value to zero

Returns
true/false

Implements yarp::dev::IEncodersRaw.

Definition at line 57 of file ImplementControlBoardInterfaces.h.

◆ setEncoderRaw()

bool yarp::dev::StubImplEncodersRaw::setEncoderRaw ( int  j,
double  val 
)
inlineoverridevirtual

Set the value of the encoder for a given joint.

Parameters
jencoder number
valnew value
Returns
true/false

Implements yarp::dev::IEncodersRaw.

Definition at line 60 of file ImplementControlBoardInterfaces.h.

◆ setEncodersRaw()

bool yarp::dev::StubImplEncodersRaw::setEncodersRaw ( const double *  vals)
inlineoverridevirtual

Set the value of all encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IEncodersRaw.

Definition at line 63 of file ImplementControlBoardInterfaces.h.


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