Fawkes API  Fawkes Development Version
dummy.cpp
1 
2 /***************************************************************************
3  * dummy.cpp - controller that controls nothing, sounds like a stupid
4  * idea but this avoids NULL checks in software using
5  * a camera controller
6  *
7  * Created: Tue May 12 19:07:59 2009
8  * Copyright 2005-2009 Tim Niemueller [www.niemueller.de]
9  *
10  ****************************************************************************/
11 
12 /* This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version. A runtime exception applies to
16  * this software (see LICENSE.GPL_WRE file mentioned below for details).
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Library General Public License for more details.
22  *
23  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
24  */
25 
26 #include <fvcams/control/dummy.h>
27 
28 namespace firevision {
29 #if 0 /* just to make Emacs auto-indent happy */
30 }
31 #endif
32 
33 /** @class DummyCameraControl <fvcams/control/dummy.h>
34  * Dummy camera control.
35  * This control supports every control type, but the operations are NOOPs.
36  * This is useful to instantiate the dummy control to avoid NULL checks.
37  * @author Tim Niemueller
38  */
39 
40 bool DummyCameraControl::auto_gain()
41 {
42  return true;
43 }
44 
45 void DummyCameraControl::set_auto_gain(bool enabled)
46 {
47 }
48 
49 bool DummyCameraControl::auto_white_balance()
50 {
51  return true;
52 }
53 
54 void DummyCameraControl::set_auto_white_balance(bool enabled)
55 {
56 }
57 
58 unsigned int DummyCameraControl::exposure_auto()
59 {
60  return 0;
61 }
62 
63 void DummyCameraControl::set_exposure_auto(unsigned int exposure_auto)
64 {
65 }
66 
67 
68 int DummyCameraControl::red_balance()
69 {
70  return 0;
71 }
72 
73 void DummyCameraControl::set_red_balance(int red_balance)
74 {
75 }
76 
77 int DummyCameraControl::blue_balance()
78 {
79  return 0;
80 }
81 
82 void DummyCameraControl::set_blue_balance(int blue_balance)
83 {
84 }
85 
86 
87 int DummyCameraControl::u_balance()
88 {
89  return 0;
90 }
91 
92 void DummyCameraControl::set_u_balance(int u_balance)
93 {
94 }
95 
96 int DummyCameraControl::v_balance()
97 {
98  return 0;
99 }
100 
101 void DummyCameraControl::set_v_balance(int v_balance)
102 {
103 }
104 
105 
106 unsigned int DummyCameraControl::brightness()
107 {
108  return 0;
109 }
110 
111 void DummyCameraControl::set_brightness(unsigned int brightness)
112 {
113 }
114 
115 unsigned int DummyCameraControl::contrast()
116 {
117  return 0;
118 }
119 
120 void DummyCameraControl::set_contrast(unsigned int contrast)
121 {
122 }
123 
124 unsigned int DummyCameraControl::saturation()
125 {
126  return 0;
127 }
128 
129 void DummyCameraControl::set_saturation(unsigned int saturation)
130 {
131 }
132 
133 int DummyCameraControl::hue()
134 {
135  return 0;
136 }
137 
138 void DummyCameraControl::set_hue(int hue)
139 {
140 }
141 
142 unsigned int DummyCameraControl::exposure()
143 {
144  return 0;
145 }
146 
147 void DummyCameraControl::set_exposure(unsigned int exposure)
148 {
149 }
150 
151 unsigned int DummyCameraControl::gain()
152 {
153  return 0;
154 }
155 
156 void DummyCameraControl::set_gain(unsigned int gain)
157 {
158 }
159 
160  // From CameraControlImage
161 const char * DummyCameraControl::format()
162 {
163  return "";
164 }
165 
166 void DummyCameraControl::set_format(const char *format)
167 {
168 }
169 
170 unsigned int DummyCameraControl::width()
171 {
172  return 0;
173 }
174 
175 unsigned int DummyCameraControl::height()
176 {
177  return 0;
178 }
179 
180 void DummyCameraControl::size(unsigned int &width, unsigned int &height)
181 {
182  width = height = 0;
183 }
184 
185 void DummyCameraControl::set_size(unsigned int width,
186  unsigned int height)
187 {
188 }
189 
190 bool DummyCameraControl::horiz_mirror()
191 {
192  return false;
193 }
194 
195 bool DummyCameraControl::vert_mirror()
196 {
197  return false;
198 }
199 
200 void DummyCameraControl::mirror(bool &horiz, bool &vert)
201 {
202  horiz = vert = false;
203 }
204 
205 void DummyCameraControl::set_horiz_mirror(bool enabled)
206 {
207 }
208 
209 void DummyCameraControl::set_vert_mirror(bool enabled)
210 {
211 }
212 
213 void DummyCameraControl::set_mirror(bool horiz, bool vert)
214 {
215 }
216 
217 
218 unsigned int DummyCameraControl::fps()
219 {
220  return 0;
221 }
222 
223 void DummyCameraControl::set_fps(unsigned int fps)
224 {
225 }
226 
227 
228 unsigned int DummyCameraControl::lens_x_corr()
229 {
230  return 0;
231 }
232 
233 unsigned int DummyCameraControl::lens_y_corr()
234 {
235  return 0;
236 }
237 
238 void DummyCameraControl::lens_corr(unsigned int &x_corr, unsigned int &y_corr)
239 {
240  x_corr = y_corr = 0;
241 }
242 
243 void DummyCameraControl::set_lens_x_corr(unsigned int x_corr)
244 {
245 }
246 
247 void DummyCameraControl::set_lens_y_corr(unsigned int y_corr)
248 {
249 }
250 
251 void DummyCameraControl::set_lens_corr(unsigned int x_corr, unsigned int y_corr)
252 {
253 }
254 
255 void DummyCameraControl::process_pantilt()
256 {
257 }
258 
259 
260 bool DummyCameraControl::supports_pan()
261 {
262  return false;
263 }
264 
265 bool DummyCameraControl::supports_tilt()
266 {
267  return false;
268 }
269 
270 void DummyCameraControl::set_pan(int pan)
271 {
272 }
273 
274 void DummyCameraControl::set_tilt(int tilt)
275 {
276 }
277 
278 void DummyCameraControl::set_pan_tilt(int pan, int tilt)
279 {
280 }
281 
282 void DummyCameraControl::set_pan_tilt_rad(float pan, float tilt)
283 {
284 }
285 
286 int DummyCameraControl::pan()
287 {
288  return 0;
289 }
290 
291 int DummyCameraControl::tilt()
292 {
293  return 0;
294 }
295 
296 void DummyCameraControl::start_get_pan_tilt()
297 {
298 }
299 
300 void DummyCameraControl::pan_tilt(int &pan, int &tilt)
301 {
302  pan = tilt = 0;
303 }
304 
305 void DummyCameraControl::pan_tilt_rad(float &pan, float &tilt)
306 {
307  pan = tilt = 0.f;
308 }
309 
310 int DummyCameraControl::min_pan()
311 {
312  return 0;
313 }
314 
315 int DummyCameraControl::max_pan()
316 {
317  return 0;
318 }
319 
320 int DummyCameraControl::min_tilt()
321 {
322  return 0;
323 }
324 
325 int DummyCameraControl::max_tilt()
326 {
327  return 0;
328 }
329 
330 void DummyCameraControl::reset_pan_tilt()
331 {
332 }
333 
334 void DummyCameraControl::set_pan_tilt_limit(int pan_left, int pan_right,
335  int tilt_up, int tilt_down)
336 {
337 }
338 
339 void DummyCameraControl::reset_pan_tilt_limit()
340 {
341 }
342 
343 void DummyCameraControl::reset_zoom()
344 {
345 }
346 
347 void DummyCameraControl::set_zoom(unsigned int zoom)
348 {
349 }
350 
351 unsigned int DummyCameraControl::zoom()
352 {
353  return 0;
354 }
355 
356 unsigned int DummyCameraControl::zoom_max()
357 {
358  return 0;
359 }
360 
361 unsigned int DummyCameraControl::zoom_min()
362 {
363  return 0;
364 }
365 
366 void DummyCameraControl::set_zoom_speed_tele(unsigned int speed)
367 {
368 }
369 
370 void DummyCameraControl::set_zoom_speed_wide(unsigned int speed)
371 {
372 }
373 
374 void DummyCameraControl::set_zoom_digital_enabled(bool enabled)
375 {
376 }
377 
378 bool DummyCameraControl::supports_effect(unsigned int effect)
379 {
380  return false;
381 }
382 
383 void DummyCameraControl::set_effect(unsigned int effect)
384 {
385 }
386 
387 unsigned int DummyCameraControl::effect()
388 {
389  return EFFECT_NONE;
390 }
391 
392 void DummyCameraControl::reset_effect()
393 {
394 }
395 
396 bool DummyCameraControl::auto_focus()
397 {
398  return true;
399 }
400 
401 void DummyCameraControl::set_auto_focus(bool enabled)
402 {
403 }
404 
405 unsigned int DummyCameraControl::focus()
406 {
407  return 0;
408 }
409 
410 void DummyCameraControl::set_focus(unsigned int focus)
411 {
412 }
413 
414 unsigned int DummyCameraControl::focus_min()
415 {
416  return 0;
417 }
418 
419 unsigned int DummyCameraControl::focus_max()
420 {
421  return 0;
422 }
423 
424 } // end namespace firevision