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 <aspect/clock.h>
27#include <aspect/configurable.h>
28#include <aspect/logging.h>
29#include <aspect/vision.h>
30#include <core/threading/thread.h>
31
32#include <string>
33
34namespace fawkes {
35class TimeTracker;
36}
37namespace firevision {
38class Camera;
39class SharedMemoryImageBuffer;
40class SeqWriter;
41class ColorModelLookupTable;
42} // namespace firevision
43
49{
50public:
51 FvRetrieverThread(const std::string &camera_string,
52 const std::string &cfg_name,
53 const 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() */
61protected:
62 virtual void
64 {
65 Thread::run();
66 }
67
68private:
69 std::string cfg_name_;
70 std::string cfg_prefix_;
71 std::string camera_string_;
72 fawkes::Time *cap_time_;
73
76 firevision::SeqWriter * seq_writer;
78 unsigned int loop_count_;
79 unsigned int ttc_capture_;
80 unsigned int ttc_memcpy_;
81 unsigned int ttc_dispose_;
82 bool cam_has_timestamp_support_;
83
85};
86
87#endif
FireVision retriever thread.
virtual ~FvRetrieverThread()
Destructor.
virtual void init()
Initialize the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
FvRetrieverThread(const std::string &camera_string, const std::string &cfg_name, const std::string &cfg_prefix)
Constructor.
virtual void loop()
Thread loop.
virtual void finalize()
Finalize the thread.
Thread aspect that allows to obtain the current time from the clock.
Definition: clock.h:34
Thread aspect to access configuration data.
Definition: configurable.h:33
Thread aspect to log output.
Definition: logging.h:33
Thread class encapsulation of pthreads.
Definition: thread.h:46
Time tracking utility.
Definition: tracker.h:37
A class for handling time.
Definition: time.h:93
Thread aspect to use in FireVision apps.
Definition: vision.h:33
Camera interface for image aquiring devices in FireVision.
Definition: camera.h:33
Color model based on a lookup table.
Definition: lookuptable.h:35
Writes a sequence of images to disk.
Definition: seq_writer.h:34
Shared memory image buffer.
Definition: shm_image.h:184
Fawkes library namespace.