Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * sony_evid100p_control.h - Controller for Sony EVI-D100P 00004 * 00005 * Created: Tue Jun 07 15:52:46 2005 00006 * Copyright 2005-2009 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __FIREVISION_CONTROL_SONYEVID100P_H_ 00025 #define __FIREVISION_CONTROL_SONYEVID100P_H_ 00026 00027 #include <cams/control/pantilt.h> 00028 #include <cams/control/zoom.h> 00029 #include <cams/control/effect.h> 00030 00031 namespace firevision { 00032 #if 0 /* just to make Emacs auto-indent happy */ 00033 } 00034 #endif 00035 00036 class CameraArgumentParser; 00037 class ViscaControl; 00038 00039 class SonyEviD100PControl 00040 : public CameraControlPanTilt, 00041 public CameraControlZoom, 00042 public CameraControlEffect 00043 { 00044 00045 public: 00046 00047 static const unsigned int EFFECT_PASTEL; 00048 static const unsigned int EFFECT_NEGATIVE; 00049 static const unsigned int EFFECT_SEPIA; 00050 static const unsigned int EFFECT_BW; 00051 static const unsigned int EFFECT_SOLARIZE; 00052 static const unsigned int EFFECT_MOSAIC; 00053 static const unsigned int EFFECT_SLIM; 00054 static const unsigned int EFFECT_STRETCH; 00055 00056 SonyEviD100PControl(const CameraArgumentParser *cap); 00057 SonyEviD100PControl(const char *tty_port); 00058 virtual ~SonyEviD100PControl(); 00059 00060 void open(); 00061 void close(); 00062 void process_pantilt(); 00063 00064 // pan/tilt 00065 bool supports_pan(); 00066 bool supports_tilt(); 00067 void set_pan(int pan); 00068 void set_tilt(int tilt); 00069 void set_pan_tilt(int pan, int tilt); 00070 void set_pan_tilt_rad(float pan, float tilt); 00071 int pan(); 00072 int tilt(); 00073 void start_get_pan_tilt(); 00074 void pan_tilt(int &pan, int &tilt); 00075 void pan_tilt_rad(float &pan, float &tilt); 00076 int min_pan(); 00077 int max_pan(); 00078 int min_tilt(); 00079 int max_tilt(); 00080 void reset_pan_tilt(); 00081 void set_pan_tilt_limit(int pan_left, int pan_right, 00082 int tilt_up, int tilt_down); 00083 void reset_pan_tilt_limit(); 00084 00085 // zoom 00086 void reset_zoom(); 00087 void set_zoom(unsigned int zoom); 00088 unsigned int zoom(); 00089 unsigned int zoom_max(); 00090 unsigned int zoom_min(); 00091 void set_zoom_speed_tele(unsigned int speed); 00092 void set_zoom_speed_wide(unsigned int speed); 00093 void set_zoom_digital_enabled(bool enabled); 00094 00095 unsigned int white_balance_mode(); 00096 00097 // effect 00098 bool supports_effect(unsigned int effect); 00099 void set_effect(unsigned int effect); 00100 unsigned int effect(); 00101 void reset_effect(); 00102 00103 00104 static const int MAX_PAN; 00105 static const int MIN_PAN; 00106 static const int MAX_TILT; 00107 static const int MIN_TILT; 00108 00109 static const float MAX_PAN_DEG; 00110 static const float MIN_PAN_DEG; 00111 static const float MAX_TILT_DEG; 00112 static const float MIN_TILT_DEG; 00113 00114 static const float MAX_PAN_RAD; 00115 static const float MIN_PAN_RAD; 00116 static const float MAX_TILT_RAD; 00117 static const float MIN_TILT_RAD; 00118 00119 static const float PAN_STEPS_PER_DEG; 00120 static const float TILT_STEPS_PER_DEG; 00121 00122 static const float PAN_STEPS_PER_RAD; 00123 static const float TILT_STEPS_PER_RAD; 00124 00125 private: 00126 ViscaControl *visca; 00127 char *tty_port; 00128 bool opened; 00129 00130 int pan_target; 00131 int tilt_target; 00132 00133 unsigned int _effect; 00134 00135 }; 00136 00137 } // end namespace firevision 00138 00139 #endif