Fawkes API  Fawkes Development Version
retriever_thread.h
1 
2 /***************************************************************************
3  * retriever_thread.h - FireVision Retriever Thread
4  *
5  * Created: Tue Jun 26 17:37:38 2007
6  * Copyright 2006-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __FIREVISION_APPS_RETRIEVER_RETRIEVER_THREAD_H_
24 #define __FIREVISION_APPS_RETRIEVER_RETRIEVER_THREAD_H_
25 
26 #include <core/threading/thread.h>
27 
28 #include <aspect/configurable.h>
29 #include <aspect/logging.h>
30 #include <aspect/clock.h>
31 #include <aspect/vision.h>
32 
33 #include <string>
34 
35 namespace fawkes {
36  class TimeTracker;
37 }
38 namespace firevision {
39  class Camera;
40  class SharedMemoryImageBuffer;
41  class SeqWriter;
42  class ColorModelLookupTable;
43 }
44 
46 : public fawkes::Thread,
48  public fawkes::LoggingAspect,
49  public fawkes::VisionAspect,
50  public fawkes::ClockAspect
51 {
52  public:
53  FvRetrieverThread(std::string camera_string, std::string cfg_name, std::string cfg_prefix);
54  virtual ~FvRetrieverThread();
55 
56  virtual void init();
57  virtual void finalize();
58  virtual void loop();
59 
60  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
61  protected: virtual void run() { Thread::run(); }
62 
63  private:
64  std::string cfg_name_;
65  std::string cfg_prefix_;
66  std::string camera_string_;
67  fawkes::Time *cap_time_;
68 
69  firevision::Camera *cam;
71  firevision::SeqWriter *seq_writer;
72  fawkes::TimeTracker *__tt;
73  unsigned int __loop_count;
74  unsigned int __ttc_capture;
75  unsigned int __ttc_memcpy;
76  unsigned int __ttc_dispose;
77  bool __cam_has_timestamp_support;
78 
80 };
81 
82 
83 #endif
virtual void run()
Stub to see name in backtrace for easier debugging.
FireVision retriever thread.
Thread aspect that allows to obtain the current time from the clock.
Definition: clock.h:36
Camera interface for image aquiring devices in FireVision.
Definition: camera.h:35
Fawkes library namespace.
virtual void run()
Code to execute in the thread.
Definition: thread.cpp:939
A class for handling time.
Definition: time.h:91
Color model based on a lookup table.
Definition: lookuptable.h:37
Thread class encapsulation of pthreads.
Definition: thread.h:42
Writes a sequence of images to disk.
Definition: seq_writer.h:36
Thread aspect to use in FireVision apps.
Definition: vision.h:35
Shared memory image buffer.
Definition: shm_image.h:181
Time tracking utility.
Definition: tracker.h:38
Thread aspect to log output.
Definition: logging.h:35
Thread aspect to access configuration data.
Definition: configurable.h:35