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 
41 {
42  return true;
43 }
44 
46 {
47 }
48 
50 {
51  return true;
52 }
53 
55 {
56 }
57 
59 {
60  return 0;
61 }
62 
64 {
65 }
66 
67 
69 {
70  return 0;
71 }
72 
74 {
75 }
76 
78 {
79  return 0;
80 }
81 
83 {
84 }
85 
86 
88 {
89  return 0;
90 }
91 
93 {
94 }
95 
97 {
98  return 0;
99 }
100 
102 {
103 }
104 
105 
107 {
108  return 0;
109 }
110 
112 {
113 }
114 
116 {
117  return 0;
118 }
119 
121 {
122 }
123 
125 {
126  return 0;
127 }
128 
130 {
131 }
132 
134 {
135  return 0;
136 }
137 
139 {
140 }
141 
143 {
144  return 0;
145 }
146 
148 {
149 }
150 
152 {
153  return 0;
154 }
155 
157 {
158 }
159 
160  // From CameraControlImage
162 {
163  return "";
164 }
165 
167 {
168 }
169 
171 {
172  return 0;
173 }
174 
176 {
177  return 0;
178 }
179 
180 void DummyCameraControl::size(unsigned int &width, unsigned int &height)
181 {
182  width = height = 0;
183 }
184 
186  unsigned int height)
187 {
188 }
189 
191 {
192  return false;
193 }
194 
196 {
197  return false;
198 }
199 
200 void DummyCameraControl::mirror(bool &horiz, bool &vert)
201 {
202  horiz = vert = false;
203 }
204 
206 {
207 }
208 
210 {
211 }
212 
213 void DummyCameraControl::set_mirror(bool horiz, bool vert)
214 {
215 }
216 
217 
219 {
220  return 0;
221 }
222 
224 {
225 }
226 
227 
229 {
230  return 0;
231 }
232 
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 
256 {
257 }
258 
259 
261 {
262  return false;
263 }
264 
266 {
267  return false;
268 }
269 
271 {
272 }
273 
275 {
276 }
277 
279 {
280 }
281 
283 {
284 }
285 
287 {
288  return 0;
289 }
290 
292 {
293  return 0;
294 }
295 
297 {
298 }
299 
301 {
302  pan = tilt = 0;
303 }
304 
306 {
307  pan = tilt = 0.f;
308 }
309 
311 {
312  return 0;
313 }
314 
316 {
317  return 0;
318 }
319 
321 {
322  return 0;
323 }
324 
326 {
327  return 0;
328 }
329 
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 
340 {
341 }
342 
344 {
345 }
346 
348 {
349 }
350 
352 {
353  return 0;
354 }
355 
357 {
358  return 0;
359 }
360 
362 {
363  return 0;
364 }
365 
367 {
368 }
369 
371 {
372 }
373 
375 {
376 }
377 
379 {
380  return false;
381 }
382 
384 {
385 }
386 
388 {
389  return EFFECT_NONE;
390 }
391 
393 {
394 }
395 
397 {
398  return true;
399 }
400 
402 {
403 }
404 
406 {
407  return 0;
408 }
409 
411 {
412 }
413 
415 {
416  return 0;
417 }
418 
420 {
421  return 0;
422 }
423 
424 } // end namespace firevision
virtual void reset_effect()
Reset effect.
Definition: dummy.cpp:392
virtual bool supports_tilt()
Check whether this controller supports tilting.
Definition: dummy.cpp:265
virtual void set_format(const char *format)
Set the image format the camera should use.
Definition: dummy.cpp:166
virtual unsigned int contrast()
Get current contrast.
Definition: dummy.cpp:115
virtual unsigned int width()
Get the current width of the image.
Definition: dummy.cpp:170
virtual unsigned int exposure_auto()
Return whether auto exposure is enabled.
Definition: dummy.cpp:58
virtual unsigned int effect()
Current effect.
Definition: dummy.cpp:387
virtual void set_zoom_speed_wide(unsigned int speed)
Set speed in wide range.
Definition: dummy.cpp:370
virtual void set_lens_y_corr(unsigned int y_corr)
Set lens y correction.
Definition: dummy.cpp:247
virtual void set_tilt(int tilt)
Set tilt value.
Definition: dummy.cpp:274
virtual void set_red_balance(int red_balance)
Set red balance.
Definition: dummy.cpp:73
virtual void lens_corr(unsigned int &x_corr, unsigned int &y_corr)
Get current lens correction.
Definition: dummy.cpp:238
virtual void set_auto_gain(bool enabled)
Enable/disable auto gain.
Definition: dummy.cpp:45
virtual int v_balance()
Get current v balance.
Definition: dummy.cpp:96
virtual void set_exposure_auto(unsigned int enabled)
Enable/disable auto exposure.
Definition: dummy.cpp:63
virtual void set_saturation(unsigned int saturation)
Set new saturation.
Definition: dummy.cpp:129
virtual void set_mirror(bool horiz, bool vert)
Set whether the camera should mirror images.
Definition: dummy.cpp:213
virtual void set_size(unsigned int width, unsigned int height)
Set the image size the camera should use.
Definition: dummy.cpp:185
virtual void set_blue_balance(int blue_balance)
Set blue balance.
Definition: dummy.cpp:82
virtual int red_balance()
Get current red balance.
Definition: dummy.cpp:68
virtual int min_tilt()
Get minimum tilt value.
Definition: dummy.cpp:320
virtual bool auto_gain()
Return whether auto gain is enabled.
Definition: dummy.cpp:40
virtual bool supports_effect(unsigned int effect)
Check if camera control supports desired effect.
Definition: dummy.cpp:378
virtual void reset_pan_tilt()
Bring camera into home position.
Definition: dummy.cpp:330
virtual unsigned int zoom_max()
Maximum zoom value.
Definition: dummy.cpp:356
virtual void set_fps(unsigned int fps)
Set the number of frames per second the camera tries to deliver.
Definition: dummy.cpp:223
virtual int tilt()
Get tilt value.
Definition: dummy.cpp:291
virtual int blue_balance()
Get current blue balance.
Definition: dummy.cpp:77
virtual void set_hue(int hue)
Set new hue.
Definition: dummy.cpp:138
virtual void set_zoom(unsigned int zoom)
Set new camera-specific zoom value.
Definition: dummy.cpp:347
virtual int min_pan()
Get minimum pan value.
Definition: dummy.cpp:310
virtual void set_pan(int pan)
Set pan value.
Definition: dummy.cpp:270
virtual void start_get_pan_tilt()
Start asynchronous fetch operation for pan and tilt values.
Definition: dummy.cpp:296
virtual unsigned int focus_min()
Get minimum focus value.
Definition: dummy.cpp:414
virtual const char * format()
Get the image format the camera currently uses.
Definition: dummy.cpp:161
virtual bool vert_mirror()
Return whether the camera image is vertically mirrored.
Definition: dummy.cpp:195
virtual void set_effect(unsigned int effect)
Enable effect.
Definition: dummy.cpp:383
virtual unsigned int lens_y_corr()
Get current lens y correction.
Definition: dummy.cpp:233
virtual unsigned int focus()
Get current focus value.
Definition: dummy.cpp:405
virtual int pan()
Get pan value.
Definition: dummy.cpp:286
virtual void reset_zoom()
Reset zoom.
Definition: dummy.cpp:343
virtual void pan_tilt(int &pan, int &tilt)
Get pan and tilt at the same time.
Definition: dummy.cpp:300
virtual unsigned int focus_max()
Get maximum focus value.
Definition: dummy.cpp:419
virtual void set_pan_tilt(int pan, int tilt)
Set pan and tilt in one go.
Definition: dummy.cpp:278
virtual bool auto_white_balance()
Return whether auto white balance is enabled.
Definition: dummy.cpp:49
virtual void set_horiz_mirror(bool enabled)
Set whether the camera should mirror images horizontally.
Definition: dummy.cpp:205
virtual void set_pan_tilt_rad(float pan, float tilt)
Set pan and tilt as float value.
Definition: dummy.cpp:282
virtual unsigned int gain()
Get current gain.
Definition: dummy.cpp:151
virtual void process_pantilt()
Process pan/tilt information.
Definition: dummy.cpp:255
virtual int hue()
Get current hue.
Definition: dummy.cpp:133
virtual unsigned int zoom_min()
Minimum zoom value.
Definition: dummy.cpp:361
virtual void set_lens_corr(unsigned int x_corr, unsigned int y_corr)
Set lens correction.
Definition: dummy.cpp:251
virtual void set_brightness(unsigned int brightness)
Set new brightness.
Definition: dummy.cpp:111
virtual unsigned int saturation()
Get current saturation.
Definition: dummy.cpp:124
virtual void set_auto_focus(bool enabled)
Enable or disable auto focus.
Definition: dummy.cpp:401
virtual bool auto_focus()
Check if auto focus is enabled.
Definition: dummy.cpp:396
virtual int u_balance()
Get current u balance.
Definition: dummy.cpp:87
virtual void set_vert_mirror(bool enabled)
Set whether the camera should mirror images vertically.
Definition: dummy.cpp:209
virtual int max_pan()
Get maximum pan value.
Definition: dummy.cpp:315
virtual unsigned int height()
Get the current height of the image.
Definition: dummy.cpp:175
virtual void set_exposure(unsigned int exposure)
Set new exposure.
Definition: dummy.cpp:147
virtual void set_gain(unsigned int gain)
Set new gain.
Definition: dummy.cpp:156
virtual bool supports_pan()
Check whether this controller supports panning.
Definition: dummy.cpp:260
static const unsigned int EFFECT_NONE
No effect constant.
Definition: effect.h:38
virtual void reset_pan_tilt_limit()
Reset pan/tilt limits.
Definition: dummy.cpp:339
virtual void set_pan_tilt_limit(int pan_left, int pan_right, int tilt_up, int tilt_down)
Set pan/tilt limits.
Definition: dummy.cpp:334
virtual void set_u_balance(int u_balance)
Set u balance.
Definition: dummy.cpp:92
virtual void set_auto_white_balance(bool enabled)
Enable/disable auto white balance.
Definition: dummy.cpp:54
virtual void set_zoom_digital_enabled(bool enabled)
Set if digital zoom may be used.
Definition: dummy.cpp:374
virtual int max_tilt()
Get maximum tilt value.
Definition: dummy.cpp:325
virtual void set_zoom_speed_tele(unsigned int speed)
Set speed in tele range.
Definition: dummy.cpp:366
virtual void set_v_balance(int v_balance)
Set v balance.
Definition: dummy.cpp:101
virtual unsigned int exposure()
Get current exposure.
Definition: dummy.cpp:142
virtual void pan_tilt_rad(float &pan, float &tilt)
Get pan and tilt at the same time in radiant.
Definition: dummy.cpp:305
virtual void set_focus(unsigned int focus)
Set new focus value.
Definition: dummy.cpp:410
virtual bool horiz_mirror()
Return whether the camera image is horizontally mirrored.
Definition: dummy.cpp:190
virtual void size(unsigned int &width, unsigned int &height)
Get the current image size.
Definition: dummy.cpp:180
virtual unsigned int zoom()
Get current zoom value.
Definition: dummy.cpp:351
virtual void mirror(bool &horiz, bool &vert)
Get information about current camera image mirroring.
Definition: dummy.cpp:200
virtual unsigned int fps()
Get the number of frames per second the camera tries to deliver.
Definition: dummy.cpp:218
virtual void set_lens_x_corr(unsigned int x_corr)
Set lens x correction.
Definition: dummy.cpp:243
virtual unsigned int lens_x_corr()
Get current lens x correction.
Definition: dummy.cpp:228
virtual void set_contrast(unsigned int contrast)
Set new contrast.
Definition: dummy.cpp:120
virtual unsigned int brightness()
Get current brightness.
Definition: dummy.cpp:106