encoder.h
Go to the documentation of this file.
00001 #ifndef PHIDGETS_API_ENCODER_H
00002 #define PHIDGETS_API_ENCODER_H
00003 
00004 #include "phidgets_api/phidget.h"
00005 
00006 namespace phidgets
00007 {
00008 
00009 class Encoder: public Phidget
00010 {
00011 public:
00012   Encoder();
00013 
00015   int getInputCount();
00016 
00019   bool getInputState(int index);
00020 
00022   int getEncoderCount();
00023 
00026   int getPosition(int index);
00027 
00031   void setPosition(int index, int position);
00032 
00036   int getIndexPosition(int index);
00037 
00040   bool getEnabled(int index);
00041 
00046   void setEnabled(int index, bool enabled);
00047 
00048 protected:
00049   CPhidgetEncoderHandle encoder_handle_;
00050 
00051   virtual void inputChangeHandler(int index, int inputState);
00052   virtual void positionChangeHandler(int index, int time, int positionChange);
00053   virtual void indexHandler(int index, int indexPosition);
00054 
00055 private:
00056   static int InputChangeHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int inputState);
00057   static int PositionChangeHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int time, int positionChange);
00058   static int IndexHandler(CPhidgetEncoderHandle phid, void *userPtr, int index, int indexPosition);
00059 };
00060 
00061 } //namespace phidgets
00062 
00063 #endif // PHIDGETS_API_ENCODEr_H


phidgets_api
Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Wed Aug 16 2017 02:50:15