#include <rtt/dev/EncoderInterface.hpp>

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 63 of file EncoderInterface.hpp.
Public Member Functions | |
| EncoderInterface (const std::string &name) | |
| EncoderInterface () | |
| virtual | ~EncoderInterface () |
| virtual int | positionGet () const =0 |
| virtual int | turnGet () const =0 |
| virtual void | positionSet (int p)=0 |
| virtual void | turnSet (int t)=0 |
| virtual int | resolution () const =0 |
| virtual bool | upcounting () const =0 |
Static Public Attributes | |
| static NameServer < EncoderInterface * > | nameserver |
| The NameServer of this interface. | |
| EncoderInterface | ( | const std::string & | name | ) | [inline] |
Create a EncoderInterface with a name.
When name is not "", and unique, it can be retrieved through EncoderInterface::nameserver .
Definition at line 73 of file EncoderInterface.hpp.
| EncoderInterface | ( | ) | [inline] |
Create a not nameserverd EncoderInterface instance.
Definition at line 80 of file EncoderInterface.hpp.
| virtual int positionGet | ( | ) | const [pure virtual] |
Get the position within the current turn.
| virtual int turnGet | ( | ) | const [pure virtual] |
Get the current turn.
| virtual void positionSet | ( | int | p | ) | [pure virtual] |
Set the position within the current turn.
| virtual void turnSet | ( | int | t | ) | [pure virtual] |
Set the current turn.
| virtual int 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 bool 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
NameServer< EncoderInterface * > nameserver [static] |
The NameServer of this interface.
Definition at line 87 of file EncoderInterface.hpp.
1.5.3