1 #ifndef PHIDGETS_API_ENCODER_H 2 #define PHIDGETS_API_ENCODER_H 56 static int InputChangeHandler(CPhidgetEncoderHandle phid,
void *userPtr,
int index,
int inputState);
57 static int PositionChangeHandler(CPhidgetEncoderHandle phid,
void *userPtr,
int index,
int time,
int positionChange);
58 static int IndexHandler(CPhidgetEncoderHandle phid,
void *userPtr,
int index,
int indexPosition);
63 #endif // PHIDGETS_API_ENCODEr_H CPhidgetEncoderHandle encoder_handle_
static int InputChangeHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int inputState)
virtual void indexHandler(int index, int indexPosition)
int getInputCount()
Gets the number of digital input channels supported by this board.
int getIndexPosition(int index)
Gets the position of an encoder the last time an index pulse occured. An index pulse in this context ...
virtual void inputChangeHandler(int index, int inputState)
void setEnabled(int index, bool enabled)
Set the powered state of an encoder. If an encoder is not enabled, it will not be given power...
int getEncoderCount()
Gets the number of encoder input channels supported by this board.
int getPosition(int index)
Reads the current position of an encoder.
static int PositionChangeHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int time, int positionChange)
bool getInputState(int index)
Reads the current state of a digital input.
static int IndexHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int indexPosition)
void setPosition(int index, int position)
Sets the offset of an encoder such that current position is the specified value.
bool getEnabled(int index)
Checks if an encoder is powered on and receiving events.
virtual void positionChangeHandler(int index, int time, int positionChange)