The most generic interface to a position/turn counter, for encoding positions.
More...
#include <EncoderInterface.hpp>
The most generic interface to a position/turn counter, for encoding positions.
Within one turn, there are resolution() position increments. After a turn-increment, the position will be exactly zero or resolution(). An upcounting() == true encoder will count from zero to resolution() between two turn increments. An upcounting() == false encoder will count from resolution() to zero between two turn increments.
Definition at line 65 of file EncoderInterface.hpp.
RTT::dev::EncoderInterface::EncoderInterface |
( |
const std::string & |
name | ) |
|
|
inline |
RTT::dev::EncoderInterface::EncoderInterface |
( |
| ) |
|
|
inline |
virtual RTT::dev::EncoderInterface::~EncoderInterface |
( |
| ) |
|
|
inlinevirtual |
virtual int RTT::dev::EncoderInterface::positionGet |
( |
| ) |
const |
|
pure virtual |
Get the position within the current turn.
virtual void RTT::dev::EncoderInterface::positionSet |
( |
int |
p | ) |
|
|
pure virtual |
Set the position within the current turn.
virtual int RTT::dev::EncoderInterface::resolution |
( |
| ) |
const |
|
pure virtual |
Return the position resolution. This number can be negative or positive and denotes the the maximal or minimal value positionGet().
virtual int RTT::dev::EncoderInterface::turnGet |
( |
| ) |
const |
|
pure virtual |
virtual void RTT::dev::EncoderInterface::turnSet |
( |
int |
t | ) |
|
|
pure virtual |
virtual bool RTT::dev::EncoderInterface::upcounting |
( |
| ) |
const |
|
pure virtual |
Returns true if after a positive turn increment, position increments positively.
Meaning from 0 to |resolution()| or from resolution() to zero if resolution() < 0
The documentation for this class was generated from the following files: