#include <encoder.h>
|
static int | InputChangeHandler (CPhidgetEncoderHandle phid, void *userPtr, int index, int inputState) |
|
static int | PositionChangeHandler (CPhidgetEncoderHandle phid, void *userPtr, int index, int time, int positionChange) |
|
Definition at line 8 of file encoder.h.
phidgets::Encoder::Encoder |
( |
| ) |
|
phidgets::Encoder::~Encoder |
( |
| ) |
|
|
virtual |
bool phidgets::Encoder::getEnabled |
( |
int |
index | ) |
|
Checks if an encoder is powered on and receiving events.
- Parameters
-
index | The index of the encoder to check |
Definition at line 90 of file encoder.cpp.
int phidgets::Encoder::getEncoderCount |
( |
| ) |
|
Gets the number of encoder input channels supported by this board.
Definition at line 49 of file encoder.cpp.
int phidgets::Encoder::getIndexPosition |
( |
int |
index | ) |
|
Gets the position of an encoder the last time an index pulse occured. An index pulse in this context refers to an input from the encoder the pulses high once every revolution.
- Parameters
-
index | The index of the encoder to read |
Definition at line 76 of file encoder.cpp.
int phidgets::Encoder::getInputCount |
( |
| ) |
|
Gets the number of digital input channels supported by this board.
Definition at line 29 of file encoder.cpp.
bool phidgets::Encoder::getInputState |
( |
int |
index | ) |
|
Reads the current state of a digital input.
- Parameters
-
index | The index of the input to read |
Definition at line 39 of file encoder.cpp.
int phidgets::Encoder::getPosition |
( |
int |
index | ) |
|
Reads the current position of an encoder.
- Parameters
-
index | The index of the encoder to read |
Definition at line 59 of file encoder.cpp.
void phidgets::Encoder::inputChangeHandler |
( |
int |
index, |
|
|
int |
inputState |
|
) |
| |
|
protectedvirtual |
int phidgets::Encoder::InputChangeHandler |
( |
CPhidgetEncoderHandle |
phid, |
|
|
void * |
userPtr, |
|
|
int |
index, |
|
|
int |
inputState |
|
) |
| |
|
staticprivate |
void phidgets::Encoder::positionChangeHandler |
( |
int |
index, |
|
|
int |
time, |
|
|
int |
positionChange |
|
) |
| |
|
protectedvirtual |
int phidgets::Encoder::PositionChangeHandler |
( |
CPhidgetEncoderHandle |
phid, |
|
|
void * |
userPtr, |
|
|
int |
index, |
|
|
int |
time, |
|
|
int |
positionChange |
|
) |
| |
|
staticprivate |
void phidgets::Encoder::setEnabled |
( |
int |
index, |
|
|
bool |
enabled |
|
) |
| |
Set the powered state of an encoder. If an encoder is not enabled, it will not be given power, and events and changes in position will not be captured.
- Parameters
-
index | The index of the encoder to change |
enabled | The new powered state of the encoder |
Definition at line 100 of file encoder.cpp.
void phidgets::Encoder::setPosition |
( |
int |
index, |
|
|
int |
position |
|
) |
| |
Sets the offset of an encoder such that current position is the specified value.
- Parameters
-
index | The index of the encoder to set |
position | The new value that should be returned by 'getPosition(index)' at the current position of the encoder |
Definition at line 69 of file encoder.cpp.
CPhidgetEncoderHandle phidgets::Encoder::encoder_handle_ |
|
private |
The documentation for this class was generated from the following files: