sony_evid100p.h
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 class CameraArgumentParser; 00032 class ViscaControl; 00033 00034 class SonyEviD100PControl 00035 : public CameraControlPanTilt, 00036 public CameraControlZoom, 00037 public CameraControlEffect 00038 { 00039 00040 public: 00041 00042 static const unsigned int EFFECT_PASTEL; 00043 static const unsigned int EFFECT_NEGATIVE; 00044 static const unsigned int EFFECT_SEPIA; 00045 static const unsigned int EFFECT_BW; 00046 static const unsigned int EFFECT_SOLARIZE; 00047 static const unsigned int EFFECT_MOSAIC; 00048 static const unsigned int EFFECT_SLIM; 00049 static const unsigned int EFFECT_STRETCH; 00050 00051 SonyEviD100PControl(const CameraArgumentParser *cap); 00052 SonyEviD100PControl(const char *tty_port); 00053 virtual ~SonyEviD100PControl(); 00054 00055 void open(); 00056 void close(); 00057 void process_pantilt(); 00058 00059 // pan/tilt 00060 bool supports_pan(); 00061 bool supports_tilt(); 00062 void set_pan(int pan); 00063 void set_tilt(int tilt); 00064 void set_pan_tilt(int pan, int tilt); 00065 void set_pan_tilt_rad(float pan, float tilt); 00066 int pan(); 00067 int tilt(); 00068 void start_get_pan_tilt(); 00069 void pan_tilt(int &pan, int &tilt); 00070 void pan_tilt_rad(float &pan, float &tilt); 00071 int min_pan(); 00072 int max_pan(); 00073 int min_tilt(); 00074 int max_tilt(); 00075 void reset_pan_tilt(); 00076 void set_pan_tilt_limit(int pan_left, int pan_right, 00077 int tilt_up, int tilt_down); 00078 void reset_pan_tilt_limit(); 00079 00080 // zoom 00081 void reset_zoom(); 00082 void set_zoom(unsigned int zoom); 00083 unsigned int zoom(); 00084 unsigned int zoom_max(); 00085 unsigned int zoom_min(); 00086 void set_zoom_speed_tele(unsigned int speed); 00087 void set_zoom_speed_wide(unsigned int speed); 00088 void set_zoom_digital_enabled(bool enabled); 00089 00090 unsigned int white_balance_mode(); 00091 00092 // effect 00093 bool supports_effect(unsigned int effect); 00094 void set_effect(unsigned int effect); 00095 unsigned int effect(); 00096 void reset_effect(); 00097 00098 00099 static const int MAX_PAN; 00100 static const int MIN_PAN; 00101 static const int MAX_TILT; 00102 static const int MIN_TILT; 00103 00104 static const float MAX_PAN_DEG; 00105 static const float MIN_PAN_DEG; 00106 static const float MAX_TILT_DEG; 00107 static const float MIN_TILT_DEG; 00108 00109 static const float MAX_PAN_RAD; 00110 static const float MIN_PAN_RAD; 00111 static const float MAX_TILT_RAD; 00112 static const float MIN_TILT_RAD; 00113 00114 static const float PAN_STEPS_PER_DEG; 00115 static const float TILT_STEPS_PER_DEG; 00116 00117 static const float PAN_STEPS_PER_RAD; 00118 static const float TILT_STEPS_PER_RAD; 00119 00120 private: 00121 ViscaControl *visca; 00122 char *tty_port; 00123 bool opened; 00124 00125 int pan_target; 00126 int tilt_target; 00127 00128 unsigned int _effect; 00129 00130 }; 00131 00132 #endif

