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

include/FCam/F2/Flash.h

Go to the documentation of this file.
00001 #ifndef FCAM_F2_FLASH_H
00002 #define FCAM_F2_FLASH_H
00003 
00004 #include "../Flash.h"
00005 #include "../Time.h"
00006 #include <vector>
00007 #include <stdio.h>
00008 
00012 namespace FCam { namespace F2 {
00013 
00014     class PhidgetFlash;
00015 
00017     class Flash : public FCam::Flash {
00018     public:
00019     
00024         Flash(int phidgetOutputIndex = 0);
00025         ~Flash();
00026 
00027         // duration in us
00028         int minDuration() {return 0;}
00029         int maxDuration() {return 0;}
00030     
00031         // brightness measured by average lumens over the duration
00032         float minBrightness() {return 0.0f;} // TODO: calibrate this
00033         float maxBrightness() {return 0.0f;}
00034 
00035 
00040         void fire(float brightness, int duration);
00041 
00043         int fireLatency() {return 127*1000;} // TODO: calibrate this
00044 
00046         void startStrobe();
00047 
00049         void stopStrobe();
00050 
00051         // instantaneous brightness in lumens at some time in the past
00052         float getBrightness(Time) {return 0.0f;} // TODO: implement this
00053     
00054         // total photometric energy (lumen-seconds or Talbots) emitted over some duration
00055         float getBrightness(Time, Time) {return 0.0f;} // TODO: implement this
00056         
00057         void tagFrame(FCam::Frame); // TODO: implement this
00058         
00059         int latencyGuess;
00060 
00062         class StrobeStartAction : public CopyableAction<StrobeStartAction> {
00063         public:
00066             StrobeStartAction(Flash *f);
00069             StrobeStartAction(Flash *f, int t);
00072             virtual void doAction();
00073         protected:
00075             Flash *flash;
00076         };
00078         class StrobeStopAction : public CopyableAction<StrobeStopAction> {
00079         public:
00082             StrobeStopAction(Flash *f);
00085             StrobeStopAction(Flash *f, int time);
00088             virtual void doAction();
00089         protected:
00091             Flash *flash;
00092         };
00093 
00094         
00095     private:
00097         PhidgetFlash *phidgetFlash;
00098     private:
00100         int phidgetIndex;
00101     private:
00102         void setDuration(int);
00103         void setBrightness(float);
00104 
00105         struct FlashState {
00106             Time time;
00107             bool state;
00108         };
00109     };
00110 
00111 }
00112 }
00113 
00114 
00115 #endif

Generated on Fri Sep 24 2010 15:52:59 for FCam by  doxygen 1.7.1