dummy.cpp

00001 
00002 /***************************************************************************
00003  *  dummy.cpp - controller that controls nothing, sounds like a stupid
00004  *                    idea but this avoids NULL checks in software using
00005  *                    a camera controller
00006  *
00007  *  Created: Tue May 12 19:07:59 2009
00008  *  Copyright  2005-2009  Tim Niemueller [www.niemueller.de]
00009  *
00010  ****************************************************************************/
00011 
00012 /*  This program is free software; you can redistribute it and/or modify
00013  *  it under the terms of the GNU General Public License as published by
00014  *  the Free Software Foundation; either version 2 of the License, or
00015  *  (at your option) any later version. A runtime exception applies to
00016  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU Library General Public License for more details.
00022  *
00023  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00024  */
00025 
00026 #include <cams/control/dummy.h>
00027 
00028 namespace firevision {
00029 #if 0 /* just to make Emacs auto-indent happy */
00030 }
00031 #endif
00032 
00033 /** @class DummyCameraControl <cams/control/dummy.h>
00034  * Dummy camera control.
00035  * This control supports every control type, but the operations are NOOPs.
00036  * This is useful to instantiate the dummy control to avoid NULL checks.
00037  * @author Tim Niemueller
00038  */
00039 
00040 bool DummyCameraControl::auto_gain()
00041 {
00042   return true;
00043 }
00044 
00045 void DummyCameraControl::set_auto_gain(bool enabled)
00046 {
00047 }
00048 
00049 bool DummyCameraControl::auto_white_balance()
00050 {
00051   return true;
00052 }
00053 
00054 void DummyCameraControl::set_auto_white_balance(bool enabled)
00055 {
00056 }
00057 
00058 bool DummyCameraControl::auto_exposure()
00059 {
00060   return true;
00061 }
00062 
00063 void DummyCameraControl::set_auto_exposure(bool enabled)
00064 {
00065 }
00066 
00067 
00068 int DummyCameraControl::red_balance()
00069 {
00070   return 0;
00071 }
00072 
00073 void DummyCameraControl::set_red_balance(int red_balance)
00074 {
00075 }
00076 
00077 int DummyCameraControl::blue_balance()
00078 {
00079   return 0;
00080 }
00081 
00082 void DummyCameraControl::set_blue_balance(int blue_balance)
00083 {
00084 }
00085 
00086 
00087 int DummyCameraControl::u_balance()
00088 {
00089   return 0;
00090 }
00091 
00092 void DummyCameraControl::set_u_balance(int u_balance)
00093 {
00094 }
00095 
00096 int DummyCameraControl::v_balance()
00097 {
00098   return 0;
00099 }
00100 
00101 void DummyCameraControl::set_v_balance(int v_balance)
00102 {
00103 }
00104 
00105 
00106 unsigned int DummyCameraControl::brightness()
00107 {
00108   return 0;
00109 }
00110 
00111 void DummyCameraControl::set_brightness(unsigned int brightness)
00112 {
00113 }
00114 
00115 unsigned int DummyCameraControl::contrast()
00116 {
00117   return 0;
00118 }
00119 
00120 void DummyCameraControl::set_contrast(unsigned int contrast)
00121 {
00122 }
00123 
00124 unsigned int DummyCameraControl::saturation()
00125 {
00126   return 0;
00127 }
00128 
00129 void DummyCameraControl::set_saturation(unsigned int saturation)
00130 {
00131 }
00132 
00133 int DummyCameraControl::hue()
00134 {
00135   return 0;
00136 }
00137 
00138 void DummyCameraControl::set_hue(int hue)
00139 {
00140 }
00141 
00142 unsigned int DummyCameraControl::exposure()
00143 {
00144   return 0;
00145 }
00146 
00147 void DummyCameraControl::set_exposure(unsigned int exposure)
00148 {
00149 }
00150 
00151 unsigned int DummyCameraControl::gain()
00152 {
00153   return 0;
00154 }
00155 
00156 void DummyCameraControl::set_gain(unsigned int gain)
00157 {
00158 }
00159 
00160   // From CameraControlImage
00161 const char * DummyCameraControl::format()
00162 {
00163   return "";
00164 }
00165 
00166 void DummyCameraControl::set_format(const char *format)
00167 {
00168 }
00169 
00170 unsigned int DummyCameraControl::width()
00171 {
00172   return 0;
00173 }
00174 
00175 unsigned int DummyCameraControl::height()
00176 {
00177   return 0;
00178 }
00179 
00180 void DummyCameraControl::size(unsigned int &width, unsigned int &height)
00181 {
00182   width = height = 0;
00183 }
00184 
00185 void DummyCameraControl::set_size(unsigned int width,
00186                                 unsigned int height)
00187 {
00188 }
00189 
00190 bool DummyCameraControl::horiz_mirror()
00191 {
00192   return false;
00193 }
00194 
00195 bool DummyCameraControl::vert_mirror()
00196 {
00197   return false;
00198 }
00199 
00200 void DummyCameraControl::mirror(bool &horiz, bool &vert)
00201 {
00202   horiz = vert = false;
00203 }
00204 
00205 void DummyCameraControl::set_horiz_mirror(bool enabled)
00206 {
00207 }
00208 
00209 void DummyCameraControl::set_vert_mirror(bool enabled)
00210 {
00211 }
00212 
00213 void DummyCameraControl::set_mirror(bool horiz, bool vert)
00214 {
00215 }
00216 
00217 
00218 unsigned int DummyCameraControl::fps()
00219 {
00220   return 0;
00221 }
00222 
00223 void DummyCameraControl::set_fps(unsigned int fps)
00224 {
00225 }
00226 
00227 
00228 unsigned int DummyCameraControl::lens_x_corr()
00229 {
00230   return 0;
00231 }
00232 
00233 unsigned int DummyCameraControl::lens_y_corr()
00234 {
00235   return 0;
00236 }
00237 
00238 void DummyCameraControl::lens_corr(unsigned int &x_corr, unsigned int &y_corr)
00239 {
00240   x_corr = y_corr = 0;
00241 }
00242 
00243 void DummyCameraControl::set_lens_x_corr(unsigned int x_corr)
00244 {
00245 }
00246 
00247 void DummyCameraControl::set_lens_y_corr(unsigned int y_corr)
00248 {
00249 }
00250 
00251 void DummyCameraControl::set_lens_corr(unsigned int x_corr, unsigned int y_corr)
00252 {
00253 }
00254 
00255 void DummyCameraControl::process_pantilt()
00256 {
00257 }
00258 
00259 
00260 bool DummyCameraControl::supports_pan()
00261 {
00262   return false;
00263 }
00264 
00265 bool DummyCameraControl::supports_tilt()
00266 {
00267   return false;
00268 }
00269 
00270 void DummyCameraControl::set_pan(int pan)
00271 {
00272 }
00273 
00274 void DummyCameraControl::set_tilt(int tilt)
00275 {
00276 }
00277 
00278 void DummyCameraControl::set_pan_tilt(int pan, int tilt)
00279 {
00280 }
00281 
00282 void DummyCameraControl::set_pan_tilt_rad(float pan, float tilt)
00283 {
00284 }
00285 
00286 int DummyCameraControl::pan()
00287 {
00288   return 0;
00289 }
00290 
00291 int DummyCameraControl::tilt()
00292 {
00293   return 0;
00294 }
00295 
00296 void DummyCameraControl::start_get_pan_tilt()
00297 {
00298 }
00299 
00300 void DummyCameraControl::pan_tilt(int &pan, int &tilt)
00301 {
00302   pan = tilt = 0;
00303 }
00304 
00305 void DummyCameraControl::pan_tilt_rad(float &pan, float &tilt)
00306 {
00307   pan = tilt = 0.f;
00308 }
00309 
00310 int DummyCameraControl::min_pan()
00311 {
00312   return 0;
00313 }
00314 
00315 int DummyCameraControl::max_pan()
00316 {
00317   return 0;
00318 }
00319 
00320 int DummyCameraControl::min_tilt()
00321 {
00322   return 0;
00323 }
00324 
00325 int DummyCameraControl::max_tilt()
00326 {
00327   return 0;
00328 }
00329 
00330 void DummyCameraControl::reset_pan_tilt()
00331 {
00332 }
00333 
00334 void DummyCameraControl::set_pan_tilt_limit(int pan_left, int pan_right,
00335                                             int tilt_up, int tilt_down)
00336 {
00337 }
00338 
00339 void DummyCameraControl::reset_pan_tilt_limit()
00340 {
00341 }
00342 
00343 void DummyCameraControl::reset_zoom()
00344 {
00345 }
00346 
00347 void DummyCameraControl::set_zoom(unsigned int zoom)
00348 {
00349 }
00350 
00351 unsigned int DummyCameraControl::zoom()
00352 {
00353   return 0;
00354 }
00355 
00356 unsigned int DummyCameraControl::zoom_max()
00357 {
00358   return 0;
00359 }
00360 
00361 unsigned int DummyCameraControl::zoom_min()
00362 {
00363   return 0;
00364 }
00365 
00366 void DummyCameraControl::set_zoom_speed_tele(unsigned int speed)
00367 {
00368 }
00369 
00370 void DummyCameraControl::set_zoom_speed_wide(unsigned int speed)
00371 {
00372 }
00373 
00374 void DummyCameraControl::set_zoom_digital_enabled(bool enabled)
00375 {
00376 }
00377 
00378 bool DummyCameraControl::supports_effect(unsigned int effect)
00379 {
00380   return false;
00381 }
00382 
00383 void DummyCameraControl::set_effect(unsigned int effect)
00384 {
00385 }
00386 
00387 unsigned int DummyCameraControl::effect()
00388 {
00389   return EFFECT_NONE;
00390 }
00391 
00392 void DummyCameraControl::reset_effect()
00393 {
00394 }
00395 
00396 bool DummyCameraControl::auto_focus()
00397 {
00398   return true;
00399 }
00400 
00401 void DummyCameraControl::set_auto_focus(bool enabled)
00402 {
00403 }
00404 
00405 unsigned int DummyCameraControl::focus()
00406 {
00407   return 0;
00408 }
00409 
00410 void DummyCameraControl::set_focus(unsigned int focus)
00411 {
00412 }
00413 
00414 unsigned int DummyCameraControl::focus_min()
00415 {
00416   return 0;
00417 }
00418 
00419 unsigned int DummyCameraControl::focus_max()
00420 {
00421   return 0;
00422 }
00423 
00424 } // end namespace firevision