Fawkes API  Fawkes Development Version
webview-ptzcam-thread.h
1 
2 /***************************************************************************
3  * webview-ptzcam-thread.h - CLIPS introspection via webview
4  *
5  * Created: Sat Jun 15 19:54:25 2013
6  * Copyright 2006-2014 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef __PLUGINS_WEBVIEW_PTZCAM_WEBVIEW_PTZCAM_THREAD_H_
23 #define __PLUGINS_WEBVIEW_PTZCAM_WEBVIEW_PTZCAM_THREAD_H_
24 
25 #include <core/threading/thread.h>
26 #include <aspect/logging.h>
27 #include <aspect/clock.h>
28 #include <aspect/blackboard.h>
29 #include <aspect/webview.h>
30 #include <aspect/configurable.h>
31 
32 namespace fawkes {
33  class TimeWait;
34  class PanTiltInterface;
35  class SwitchInterface;
36 }
37 
39 
41 : public fawkes::Thread,
42  public fawkes::LoggingAspect,
43  public fawkes::ClockAspect,
47 {
48  public:
50  virtual ~WebviewPtzCamThread();
51 
52  virtual void init();
53  virtual void loop();
54  virtual void finalize();
55 
56  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
57  protected: virtual void run() { Thread::run(); }
58 
59  private:
61 
62  fawkes::TimeWait *time_wait_;
63  fawkes::PanTiltInterface *ptu_if_;
64  fawkes::SwitchInterface *power_if_;
65  fawkes::SwitchInterface *camen_if_;
66 
67  bool timeout_;
68 
69  float cfg_inactivity_timeout_;
70  float cfg_park_pan_tolerance_;
71  float cfg_park_pan_pos_;
72  float cfg_park_tilt_tolerance_;
73  float cfg_park_tilt_pos_;
74 
75 };
76 
77 #endif
Pan/tilt/zoom camera control via webview.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
Thread aspect that allows to obtain the current time from the clock.
Definition: clock.h:36
Pan/tilt/zoom camera request processor.
Fawkes library namespace.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void run()
Code to execute in the thread.
Definition: thread.cpp:939
Thread class encapsulation of pthreads.
Definition: thread.h:42
SwitchInterface Fawkes BlackBoard Interface.
Thread aspect to log output.
Definition: logging.h:35
Thread aspect to access configuration data.
Definition: configurable.h:35
PanTiltInterface Fawkes BlackBoard Interface.
Thread aspect to provide web pages via Webview.
Definition: webview.h:38
Time wait utility.
Definition: wait.h:32