Fawkes API  Fawkes Development Version
webview-ptzcam-processor.h
1 
2 /***************************************************************************
3  * webview-ptzcam-processor.h - Pan/tilt/zoom camera control for webview
4  *
5  * Created: Fri Feb 07 17:51:06 2014
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_PROCESSOR_H_
23 #define __PLUGINS_WEBVIEW_PTZCAM_WEBVIEW_PTZCAM_PROCESSOR_H_
24 
25 #include <webview/request_processor.h>
26 
27 #include <string>
28 #include <tuple>
29 #include <map>
30 
31 namespace fawkes {
32  class Logger;
33  class BlackBoard;
34  class PanTiltInterface;
35  class CameraControlInterface;
36  class SwitchInterface;
37 }
38 
40 {
41  public:
42  WebviewPtzCamRequestProcessor(std::string base_url, std::string image_id, std::string pantilt_id,
43  std::string camctrl_id, std::string power_id, std::string camera_id,
44  float pan_increment, float tilt_increment, unsigned int zoom_increment,
45  float post_powerup_time,
46  std::map<std::string, std::tuple<std::string, float, float, unsigned int>> presets,
47  fawkes::BlackBoard *blackboard, fawkes::Logger *logger);
48 
50 
51  virtual fawkes::WebReply * process_request(const fawkes::WebRequest *request);
52 
53  private:
54 
55  private:
56  fawkes::Logger *logger_;
57  fawkes::BlackBoard *blackboard_;
58 
59  fawkes::PanTiltInterface *ptu_if_;
60  fawkes::CameraControlInterface *camctrl_if_;
61  fawkes::SwitchInterface *power_if_;
62  fawkes::SwitchInterface *camen_if_;
63 
64  std::string baseurl_;
65  std::string image_id_;
66 
67  std::map<std::string, std::tuple<std::string, float, float, unsigned int>> presets_;
68 
69  float pan_increment_;
70  float tilt_increment_;
71  long int zoom_increment_;
72  long int post_powerup_time_;
73 };
74 
75 #endif
Pan/tilt/zoom camera request processor.
Fawkes library namespace.
Abstract web request processor.
CameraControlInterface Fawkes BlackBoard Interface.
SwitchInterface Fawkes BlackBoard Interface.
Web request meta data carrier.
Definition: request.h:42
Basic web reply.
Definition: reply.h:36
PanTiltInterface Fawkes BlackBoard Interface.
The BlackBoard abstract class.
Definition: blackboard.h:48
Interface for logging.
Definition: logger.h:34