• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/F2/PhidgetDevice.h

Go to the documentation of this file.
00001 #ifndef FCAM_PHIDGETDEVICE_H
00002 #define FCAM_PHIDGETDEVICE_H
00003 
00008 #include "FCam/Device.h"
00009 
00010 #include "linux/phidget21.h"
00011 #include <vector>
00012 #include <utility>
00013 
00014 namespace FCam {
00015 namespace F2 {
00023 class PhidgetDevice : public FCam::Device {
00024 public:
00030     PhidgetDevice();
00032     virtual void tagFrame(Frame);
00033     
00034 protected:
00037     static CPhidgetInterfaceKitHandle ifKit;
00039     static bool phidgetsAvailable;
00041     static void registerInputChangeHandler(int index, PhidgetDevice * device);
00043     static void registerOutputChangeHandler(int index, PhidgetDevice * device);
00045     static void registerSensorChangeHandler(int index, PhidgetDevice * device);
00046     
00047     
00051     virtual int handleInputChange(CPhidgetInterfaceKitHandle IFK, int index, int state);
00055     virtual int handleOutputChange(CPhidgetInterfaceKitHandle IFK, int index, int state);
00059     virtual int handleSensorChange(CPhidgetInterfaceKitHandle IFK, int index, int state);
00060 private:
00061     static std::vector<PhidgetDevice *> inputChangeHandlers[8];
00062     static std::vector<PhidgetDevice *> outputChangeHandlers[8];
00063     static std::vector<PhidgetDevice *> sensorChangeHandlers[8];
00064     
00065     static int phidgetAttachHandler(CPhidgetHandle IFK, void *userptr);
00066     static int phidgetDetachHandler(CPhidgetHandle IFK, void *userptr);
00067     static int phidgetErrorHandler(CPhidgetHandle IFK, void *userptr, int errCode, const char *errMsg);
00068     static int phidgetInputChangeHandler(CPhidgetInterfaceKitHandle IFK, void *userptr, int index, int state);
00069     static int phidgetOutputChangeHandler(CPhidgetInterfaceKitHandle IFK, void *userptr, int index, int state);
00070     static int phidgetSensorChangeHandler(CPhidgetInterfaceKitHandle IFK, void *userptr, int index, int value);    
00071 };
00072 
00073 }
00074 }
00075 
00076 
00077 #endif

Generated on Fri Sep 24 2010 15:53:00 for FCam by  doxygen 1.7.1