#include <encoder.h>
|
static int | IndexHandler (CPhidgetEncoderHandle phid, void *userPtr, int index, int indexPosition) |
|
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 9 of file encoder.h.
phidgets::Encoder::Encoder |
( |
| ) |
|
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 87 of file encoder.cpp.
int phidgets::Encoder::getEncoderCount |
( |
| ) |
|
Gets the number of encoder input channels supported by this board.
Definition at line 47 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 74 of file encoder.cpp.
int phidgets::Encoder::getInputCount |
( |
| ) |
|
Gets the number of digital input channels supported by this board.
Definition at line 27 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 37 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 57 of file encoder.cpp.
void phidgets::Encoder::indexHandler |
( |
int |
index, |
|
|
int |
indexPosition |
|
) |
| |
|
protectedvirtual |
int phidgets::Encoder::IndexHandler |
( |
CPhidgetEncoderHandle |
phid, |
|
|
void * |
userPtr, |
|
|
int |
index, |
|
|
int |
indexPosition |
|
) |
| |
|
staticprivate |
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 97 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 67 of file encoder.cpp.
CPhidgetEncoderHandle phidgets::Encoder::encoder_handle_ |
|
protected |
The documentation for this class was generated from the following files: