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

include/FCam/Dummy/Sensor.h

Go to the documentation of this file.
00001 #ifndef FCAM_DUMMY_SENSOR_H
00002 #define FCAM_DUMMY_SENSOR_H
00003 
00008 #include <pthread.h>
00009 
00010 #include "../Sensor.h"
00011 #include "Frame.h"
00012 #include <FCam/Dummy/Platform.h>
00013 
00014 namespace FCam { namespace Dummy {
00015 
00016     class Daemon;
00017 
00026     class Sensor : public FCam::Sensor { 
00027     public:
00028         Sensor(); ~Sensor();
00029 
00030         void capture(const FCam::Shot &);
00031         void capture(const Shot &);
00032 
00033         void capture(const std::vector<FCam::Shot> &);
00034         void capture(const std::vector<Shot> &);
00035 
00036         void stream(const FCam::Shot &);
00037         void stream(const Shot &);
00038 
00039         void stream(const std::vector<FCam::Shot> &);
00040         void stream(const std::vector<Shot> &);
00041 
00042         bool streaming();
00043         void stopStreaming();
00044         void start();
00045         void stop();
00046 
00047         virtual int maxExposure() const {return 10000000;} 
00048 
00049         virtual int minExposure() const {return 1;}       
00050 
00051         virtual int maxFrameTime() const {return 10000000;}
00052 
00053         virtual int minFrameTime() const {return 1;}      
00054 
00055         virtual float maxGain() const {return 1000.0f;}     
00056 
00057         virtual float minGain() const {return 1.0f;}      
00058 
00059         virtual Size minImageSize() const {return Size(1, 1);}
00060 
00061         virtual Size maxImageSize() const {return Size(3000, 2000);}
00062 
00063         virtual int maxHistogramRegions() const {return 4;}
00064 
00065         int rollingShutterTime(const FCam::Shot &) const;
00066             
00067         int framesPending() const;
00068         int shotsPending() const;
00069 
00070         const FCam::Platform &platform() {return Platform::instance();}
00071 
00072         FCam::Dummy::Frame getFrame();
00073 
00074     protected:
00075         
00076         FCam::Frame getBaseFrame() {return getFrame();}
00077 
00078     private:
00079         friend class Daemon;
00080         Daemon *daemon;
00081 
00082         void generateRequest();
00083 
00084         pthread_mutex_t requestMutex;
00085 
00086         // The currently streaming shot            
00087         std::vector<Shot> streamingShot;
00088 
00089         void enforceDropPolicy();
00090 
00091         int shotsPending_;
00092     };
00093 }}
00094 
00095 #endif

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