Fawkes API Fawkes Development Version
sony_evid100p.h
1
2/***************************************************************************
3 * sony_evid100p_control.h - Controller for Sony EVI-D100P
4 *
5 * Created: Tue Jun 07 15:52:46 2005
6 * Copyright 2005-2009 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _FIREVISION_CONTROL_SONYEVID100P_H_
25#define _FIREVISION_CONTROL_SONYEVID100P_H_
26
27#include <fvcams/control/effect.h>
28#include <fvcams/control/pantilt.h>
29#include <fvcams/control/zoom.h>
30
31namespace firevision {
32
33class CameraArgumentParser;
34class ViscaControl;
35
37 public CameraControlZoom,
39{
40public:
41 static const unsigned int EFFECT_PASTEL;
42 static const unsigned int EFFECT_NEGATIVE;
43 static const unsigned int EFFECT_SEPIA;
44 static const unsigned int EFFECT_BW;
45 static const unsigned int EFFECT_SOLARIZE;
46 static const unsigned int EFFECT_MOSAIC;
47 static const unsigned int EFFECT_SLIM;
48 static const unsigned int EFFECT_STRETCH;
49
51 SonyEviD100PControl(const char *tty_port);
52 virtual ~SonyEviD100PControl();
53
54 void open();
55 void close();
56 void process_pantilt();
57
58 // pan/tilt
59 bool supports_pan();
60 bool supports_tilt();
61 void set_pan(int pan);
62 void set_tilt(int tilt);
63 void set_pan_tilt(int pan, int tilt);
64 void set_pan_tilt_rad(float pan, float tilt);
65 int pan();
66 int tilt();
67 void start_get_pan_tilt();
68 void pan_tilt(int &pan, int &tilt);
69 void pan_tilt_rad(float &pan, float &tilt);
70 int min_pan();
71 int max_pan();
72 int min_tilt();
73 int max_tilt();
74 void reset_pan_tilt();
75 void set_pan_tilt_limit(int pan_left, int pan_right, int tilt_up, int tilt_down);
77
78 // zoom
79 void reset_zoom();
80 void set_zoom(unsigned int zoom);
81 unsigned int zoom();
82 unsigned int zoom_max();
83 unsigned int zoom_min();
84 void set_zoom_speed_tele(unsigned int speed);
85 void set_zoom_speed_wide(unsigned int speed);
86 void set_zoom_digital_enabled(bool enabled);
87
88 unsigned int white_balance_mode();
89
90 // effect
91 bool supports_effect(unsigned int effect);
92 void set_effect(unsigned int effect);
93 unsigned int effect();
94 void reset_effect();
95
96 static const int MAX_PAN;
97 static const int MIN_PAN;
98 static const int MAX_TILT;
99 static const int MIN_TILT;
100
101 static const float MAX_PAN_DEG;
102 static const float MIN_PAN_DEG;
103 static const float MAX_TILT_DEG;
104 static const float MIN_TILT_DEG;
105
106 static const float MAX_PAN_RAD;
107 static const float MIN_PAN_RAD;
108 static const float MAX_TILT_RAD;
109 static const float MIN_TILT_RAD;
110
111 static const float PAN_STEPS_PER_DEG;
112 static const float TILT_STEPS_PER_DEG;
113
114 static const float PAN_STEPS_PER_RAD;
115 static const float TILT_STEPS_PER_RAD;
116
117private:
118 ViscaControl *visca;
119 char * tty_port;
120 bool opened;
121
122 int pan_target;
123 int tilt_target;
124
125 unsigned int _effect;
126};
127
128} // end namespace firevision
129
130#endif
Camera argument parser.
Definition: camargp.h:36
Camera effect control interface.
Definition: effect.h:33
Camera pan/tilt control interface.
Definition: pantilt.h:33
Camera zoom control interface.
Definition: zoom.h:33
Sony Evi D100P pan/tilt control.
Definition: sony_evid100p.h:39
static const int MAX_TILT
Max Tilt.
Definition: sony_evid100p.h:98
static const unsigned int EFFECT_SEPIA
Sepia effect.
Definition: sony_evid100p.h:43
void set_zoom_speed_tele(unsigned int speed)
Set speed in tele range.
static const int MIN_TILT
Min tilt .
Definition: sony_evid100p.h:99
void set_zoom_digital_enabled(bool enabled)
Set if digital zoom may be used.
void set_tilt(int tilt)
Set tilt value.
void process_pantilt()
Process pan/tilt information.
void start_get_pan_tilt()
Start asynchronous fetch operation for pan and tilt values.
void set_effect(unsigned int effect)
Enable effect.
static const float TILT_STEPS_PER_DEG
Tilt steps per degree.
bool supports_tilt()
Check whether this controller supports tilting.
static const unsigned int EFFECT_PASTEL
Pastel effect.
Definition: sony_evid100p.h:41
static const float MAX_PAN_RAD
Max pan in rad.
static const float TILT_STEPS_PER_RAD
Tilt steps per rad.
void reset_pan_tilt()
Bring camera into home position.
unsigned int white_balance_mode()
Get current white balance mode.
bool supports_pan()
Check whether this controller supports panning.
void pan_tilt(int &pan, int &tilt)
Get pan and tilt at the same time.
static const unsigned int EFFECT_NEGATIVE
Negative effect.
Definition: sony_evid100p.h:42
static const float MAX_TILT_RAD
Max tilt in rad.
void set_pan_tilt_rad(float pan, float tilt)
Set pan and tilt as float value.
static const unsigned int EFFECT_SOLARIZE
Solarize effect.
Definition: sony_evid100p.h:45
static const float MAX_TILT_DEG
Max tilt in degrees.
unsigned int zoom_max()
Maximum zoom value.
void set_pan(int pan)
Set pan value.
void set_zoom(unsigned int zoom)
Set new camera-specific zoom value.
int min_tilt()
Get minimum tilt value.
SonyEviD100PControl(const CameraArgumentParser *cap)
Constructor.
static const int MAX_PAN
Maximum pan.
Definition: sony_evid100p.h:96
void pan_tilt_rad(float &pan, float &tilt)
Get pan and tilt at the same time in radiant.
static const int MIN_PAN
Minimum pan.
Definition: sony_evid100p.h:97
int max_tilt()
Get maximum tilt value.
void open()
Open visca device.
static const unsigned int EFFECT_STRETCH
Stretch effect.
Definition: sony_evid100p.h:48
void set_pan_tilt_limit(int pan_left, int pan_right, int tilt_up, int tilt_down)
Set pan/tilt limits.
int max_pan()
Get maximum pan value.
bool supports_effect(unsigned int effect)
Check if camera control supports desired effect.
static const float MAX_PAN_DEG
Max pan in degrees.
unsigned int zoom_min()
Minimum zoom value.
unsigned int zoom()
Get current zoom value.
void reset_effect()
Reset effect.
virtual ~SonyEviD100PControl()
Destructor.
static const float MIN_PAN_RAD
Min pan in rad.
void set_zoom_speed_wide(unsigned int speed)
Set speed in wide range.
static const unsigned int EFFECT_BW
B/W effect.
Definition: sony_evid100p.h:44
void close()
Close Visca device.
static const float PAN_STEPS_PER_DEG
Pan steps per degree.
void reset_pan_tilt_limit()
Reset pan/tilt limits.
void set_pan_tilt(int pan, int tilt)
Set pan and tilt in one go.
unsigned int effect()
Current effect.
static const float PAN_STEPS_PER_RAD
Pan steps per rad.
static const float MIN_PAN_DEG
Min pan in degrees.
int min_pan()
Get minimum pan value.
static const float MIN_TILT_DEG
Min tilt in degrees.
static const unsigned int EFFECT_SLIM
Slim effect.
Definition: sony_evid100p.h:47
static const unsigned int EFFECT_MOSAIC
Mosaic effect.
Definition: sony_evid100p.h:46
static const float MIN_TILT_RAD
Min tilt in rad.
Visca control protocol implementation over a serial line.
Definition: visca.h:54