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 namespace fawkes {
00033 class TimeTracker;
00034 }
00035 namespace firevision {
00036 class Camera;
00037 class SharedMemoryImageBuffer;
00038 class SeqWriter;
00039 class ColorModelLookupTable;
00040 }
00041
00042 class FvRetrieverThread
00043 : public fawkes::Thread,
00044 public fawkes::ConfigurableAspect,
00045 public fawkes::LoggingAspect,
00046 public fawkes::VisionAspect
00047 {
00048 public:
00049 FvRetrieverThread(const char *camera_string, const char *id);
00050 virtual ~FvRetrieverThread();
00051
00052 virtual void init();
00053 virtual void finalize();
00054 virtual void loop();
00055
00056
00057 protected: virtual void run() { Thread::run(); }
00058
00059 private:
00060 char *__id;
00061 char *__camera_string;
00062
00063 firevision::Camera *cam;
00064 firevision::SharedMemoryImageBuffer *shm;
00065 firevision::SeqWriter *seq_writer;
00066 fawkes::TimeTracker *__tt;
00067 unsigned int __loop_count;
00068 unsigned int __ttc_capture;
00069 unsigned int __ttc_memcpy;
00070 unsigned int __ttc_dispose;
00071 bool __cam_has_timestamp_support;
00072
00073 firevision::ColorModelLookupTable *__cm;
00074 };
00075
00076
00077 #endif