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