#include <yarp/dev/ImplementEncoders.h>
Inheritance diagram for yarp::dev::ImplementEncoders:Public Member Functions | |
| ImplementEncoders (yarp::dev::IEncodersRaw *y) | |
| virtual | ~ImplementEncoders () |
| Destructor. More... | |
| 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 *spds) override |
| Read the instantaneous speed of an axis. More... | |
| bool | getEncoderSpeeds (double *spds) override |
| Read the instantaneous speed of all axes. More... | |
| bool | getEncoderAcceleration (int j, double *spds) override |
| Read the instantaneous acceleration of an axis. More... | |
| bool | getEncoderAccelerations (double *accs) override |
| Read the instantaneous acceleration of all axes. More... | |
Public Member Functions inherited from yarp::dev::IEncoders | |
| virtual | ~IEncoders () |
| Destructor. More... | |
| virtual bool | getAxes (int *ax)=0 |
| Get the number of controlled axes. More... | |
| virtual bool | resetEncoder (int j)=0 |
| Reset encoder, single joint. More... | |
| virtual bool | resetEncoders ()=0 |
| Reset encoders. More... | |
| virtual bool | setEncoder (int j, double val)=0 |
| Set the value of the encoder for a given joint. More... | |
| virtual bool | setEncoders (const double *vals)=0 |
| Set the value of all encoders. More... | |
| virtual bool | getEncoder (int j, double *v)=0 |
| Read the value of an encoder. More... | |
| virtual bool | getEncoders (double *encs)=0 |
| Read the position of all axes. More... | |
| virtual bool | getEncoderSpeed (int j, double *sp)=0 |
| Read the istantaneous speed of an axis. More... | |
| virtual bool | getEncoderSpeeds (double *spds)=0 |
| Read the instantaneous speed of all axes. More... | |
| virtual bool | getEncoderAcceleration (int j, double *spds)=0 |
| Read the instantaneous acceleration of an axis. More... | |
| virtual bool | getEncoderAccelerations (double *accs)=0 |
| Read the instantaneous acceleration of all axes. More... | |
Protected Member Functions | |
| bool | initialize (int size, const int *amap, const double *enc, const double *zos) |
| Initialize the internal data and alloc memory. More... | |
| bool | uninitialize () |
| Clean up internal data and memory. More... | |
Protected Attributes | |
| IEncodersRaw * | iEncoders |
| void * | helper |
| double * | temp |
Definition at line 16 of file ImplementEncoders.h.
| ImplementEncoders::ImplementEncoders | ( | yarp::dev::IEncodersRaw * | y | ) |
Definition at line 20 of file ImplementEncoders.cpp.
|
virtual |
|
overridevirtual |
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface.
Implements yarp::dev::IEncoders.
Definition at line 62 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the value of an encoder.
| j | encoder number |
| v | pointer to storage for the return value |
Implements yarp::dev::IEncoders.
Definition at line 99 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the instantaneous acceleration of an axis.
| j | axis number |
| spds | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 151 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all axes.
| accs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 166 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the position of all axes.
| encs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 114 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the instantaneous speed of an axis.
| j | axis number |
| spds | pointer to storage for the output |
Implements yarp::dev::IEncoders.
Definition at line 126 of file ImplementEncoders.cpp.
|
overridevirtual |
Read the instantaneous speed of all axes.
| spds | pointer to storage for the output values |
Implements yarp::dev::IEncoders.
Definition at line 141 of file ImplementEncoders.cpp.
|
protected |
Initialize the internal data and alloc memory.
| size | is the number of controlled axes the driver deals with. |
| amap | is a lookup table mapping axes onto physical drivers. |
| enc | is an array containing the encoder to angles conversion factors. |
| zos | is an array containing the zeros of the encoders. |
Definition at line 32 of file ImplementEncoders.cpp.
|
overridevirtual |
Reset encoder, single joint.
Set the encoder value to zero
| j | encoder number |
Implements yarp::dev::IEncoders.
Definition at line 68 of file ImplementEncoders.cpp.
|
overridevirtual |
Reset encoders.
Set the encoders value to zero
Implements yarp::dev::IEncoders.
Definition at line 77 of file ImplementEncoders.cpp.
|
overridevirtual |
Set the value of the encoder for a given joint.
| j | encoder number |
| val | new value |
Implements yarp::dev::IEncoders.
Definition at line 82 of file ImplementEncoders.cpp.
|
overridevirtual |
Set the value of all encoders.
| vals | pointer to the new values |
Implements yarp::dev::IEncoders.
Definition at line 92 of file ImplementEncoders.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 49 of file ImplementEncoders.cpp.
|
protected |
Definition at line 20 of file ImplementEncoders.h.
|
protected |
Definition at line 19 of file ImplementEncoders.h.
|
protected |
Definition at line 21 of file ImplementEncoders.h.