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 {
00013 namespace F2 {
00014
00015 class PhidgetFlash;
00016
00018 class Flash : public FCam::Flash {
00019 public:
00020
00025 Flash(int phidgetOutputIndex = 0);
00026 ~Flash();
00027
00028
00029 int minDuration() {return 0;}
00030 int maxDuration() {return 0;}
00031
00032
00033 float minBrightness() {return 0.0f;}
00034 float maxBrightness() {return 0.0f;}
00035
00036
00041 void fire(float brightness, int duration);
00042
00044 int fireLatency() {return 127*1000;}
00045
00047 void startStrobe();
00048
00050 void stopStrobe();
00051
00052
00053 float getBrightness(Time) {return 0.0f;}
00054
00055
00056 float getBrightness(Time, Time) {return 0.0f;}
00057
00058 void tagFrame(FCam::Frame);
00059
00060 int latencyGuess;
00061
00063 class StrobeStartAction : public CopyableAction<StrobeStartAction> {
00064 public:
00067 StrobeStartAction(Flash *f);
00070 StrobeStartAction(Flash *f, int t);
00073 virtual void doAction();
00074 protected:
00076 Flash *flash;
00077 };
00079 class StrobeStopAction : public CopyableAction<StrobeStopAction> {
00080 public:
00083 StrobeStopAction(Flash *f);
00086 StrobeStopAction(Flash *f, int time);
00089 virtual void doAction();
00090 protected:
00092 Flash *flash;
00093 };
00094
00095
00096 private:
00098 PhidgetFlash *phidgetFlash;
00099 private:
00101 int phidgetIndex;
00102 private:
00103 void setDuration(int);
00104 void setBrightness(float);
00105
00106 struct FlashState {
00107 Time time;
00108 bool state;
00109 };
00110 };
00111
00112 }
00113 }
00114
00115
00116 #endif