retriever_thread.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __FIREVISION_APPS_RETRIEVER_RETRIEVER_THREAD_H_
00024 #define __FIREVISION_APPS_RETRIEVER_RETRIEVER_THREAD_H_
00025
00026 #include <core/threading/thread.h>
00027
00028 #include <aspect/configurable.h>
00029 #include <aspect/logging.h>
00030 #include <aspect/vision.h>
00031
00032 class Camera;
00033 class SharedMemoryImageBuffer;
00034 class SeqWriter;
00035 class ColorModelLookupTable;
00036 namespace fawkes {
00037 class TimeTracker;
00038 }
00039
00040 class FvRetrieverThread
00041 : public fawkes::Thread,
00042 public fawkes::ConfigurableAspect,
00043 public fawkes::LoggingAspect,
00044 public fawkes::VisionAspect
00045 {
00046 public:
00047 FvRetrieverThread(const char *camera_string, const char *id);
00048 virtual ~FvRetrieverThread();
00049
00050 virtual void init();
00051 virtual void finalize();
00052 virtual void loop();
00053
00054
00055 protected: virtual void run() { Thread::run(); }
00056
00057 private:
00058 char *__id;
00059 char *__camera_string;
00060
00061 Camera *cam;
00062 SharedMemoryImageBuffer *shm;
00063 SeqWriter *seq_writer;
00064 fawkes::TimeTracker *__tt;
00065 unsigned int __loop_count;
00066 unsigned int __ttc_capture;
00067 unsigned int __ttc_memcpy;
00068 unsigned int __ttc_dispose;
00069
00070 ColorModelLookupTable *__cm;
00071 };
00072
00073
00074 #endif