Sony Evi D100P pan/tilt control. More...
#include <>>
Public Member Functions | |
SonyEviD100PControl (const CameraArgumentParser *cap) | |
Constructor. | |
SonyEviD100PControl (const char *tty_port) | |
Constructor. | |
virtual | ~SonyEviD100PControl () |
Destructor. | |
void | open () |
Open visca device. | |
void | close () |
Close Visca device. | |
void | process_pantilt () |
bool | supports_pan () |
bool | supports_tilt () |
void | set_pan (int pan) |
void | set_tilt (int tilt) |
void | set_pan_tilt (int pan, int tilt) |
void | set_pan_tilt_rad (float pan, float tilt) |
int | pan () |
int | tilt () |
void | start_get_pan_tilt () |
void | pan_tilt (int &pan, int &tilt) |
void | pan_tilt_rad (float &pan, float &tilt) |
int | min_pan () |
int | max_pan () |
int | min_tilt () |
int | max_tilt () |
void | reset_pan_tilt () |
void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
void | reset_pan_tilt_limit () |
void | reset_zoom () |
void | set_zoom (unsigned int zoom) |
unsigned int | zoom () |
unsigned int | zoom_max () |
unsigned int | zoom_min () |
void | set_zoom_speed_tele (unsigned int speed) |
void | set_zoom_speed_wide (unsigned int speed) |
void | set_zoom_digital_enabled (bool enabled) |
unsigned int | white_balance_mode () |
Get current white balance mode. | |
bool | supports_effect (unsigned int effect) |
Check if camera control supports desired effect. | |
void | set_effect (unsigned int effect) |
Enable effect. | |
unsigned int | effect () |
Current effect. | |
void | reset_effect () |
Reset effect. | |
Static Public Attributes | |
static const unsigned int | EFFECT_PASTEL = 1 |
Pastel effect. | |
static const unsigned int | EFFECT_NEGATIVE = 2 |
Negative effect. | |
static const unsigned int | EFFECT_SEPIA = 3 |
Sepia effect. | |
static const unsigned int | EFFECT_BW = 4 |
B/W effect. | |
static const unsigned int | EFFECT_SOLARIZE = 5 |
Solarize effect. | |
static const unsigned int | EFFECT_MOSAIC = 6 |
Mosaic effect. | |
static const unsigned int | EFFECT_SLIM = 7 |
Slim effect. | |
static const unsigned int | EFFECT_STRETCH = 8 |
Stretch effect. | |
static const int | MAX_PAN = 1440 |
Maximum pan. | |
static const int | MIN_PAN = -1439 |
Minimum pan. | |
static const int | MAX_TILT = 360 |
Max Tilt. | |
static const int | MIN_TILT = - 359 |
Min tilt . | |
static const float | MAX_PAN_DEG = 100.f |
Max pan in degrees. | |
static const float | MIN_PAN_DEG = -100.f |
Min pan in degrees. | |
static const float | MAX_TILT_DEG = 25.f |
Max tilt in degrees. | |
static const float | MIN_TILT_DEG = - 25.f |
Min tilt in degrees. | |
static const float | MAX_PAN_RAD = deg2rad(MAX_PAN_DEG) |
Max pan in rad. | |
static const float | MIN_PAN_RAD = deg2rad(MIN_PAN_DEG) |
Min pan in rad. | |
static const float | MAX_TILT_RAD = deg2rad(MAX_TILT_DEG) |
Max tilt in rad. | |
static const float | MIN_TILT_RAD = deg2rad(MIN_TILT_DEG) |
Min tilt in rad. | |
static const float | PAN_STEPS_PER_DEG = MAX_PAN / MAX_PAN_DEG |
Pan steps per degree. | |
static const float | TILT_STEPS_PER_DEG = MAX_TILT / MAX_TILT_DEG |
Tilt steps per degree. | |
static const float | PAN_STEPS_PER_RAD = MAX_PAN / MAX_PAN_RAD |
Pan steps per rad. | |
static const float | TILT_STEPS_PER_RAD = MAX_TILT / MAX_TILT_RAD |
Tilt steps per rad. |
Sony Evi D100P pan/tilt control.
Internally uses Visca.
Definition at line 39 of file sony_evid100p.h.
firevision::SonyEviD100PControl::SonyEviD100PControl | ( | const CameraArgumentParser * | cap | ) |
Constructor.
Uses camera argument parser to gather arguments. The ID that the camera argument parser returns is used as the serial port (like /dev/ttyS0).
cap | camera argument parser |
Definition at line 125 of file sony_evid100p.cpp.
References firevision::CameraArgumentParser::cam_id(), firevision::CameraControlEffect::EFFECT_NONE, and open().
firevision::SonyEviD100PControl::SonyEviD100PControl | ( | const char * | tty_port | ) |
Constructor.
tty_port | serial port (e.g. /dev/ttyS0) |
Definition at line 107 of file sony_evid100p.cpp.
References firevision::CameraControlEffect::EFFECT_NONE, and open().
firevision::SonyEviD100PControl::~SonyEviD100PControl | ( | ) | [virtual] |
void firevision::SonyEviD100PControl::close | ( | ) |
Close Visca device.
Definition at line 173 of file sony_evid100p.cpp.
References firevision::ViscaControl::close().
Referenced by ~SonyEviD100PControl().
unsigned int firevision::SonyEviD100PControl::effect | ( | ) | [virtual] |
Current effect.
Implements firevision::CameraControlEffect.
Definition at line 456 of file sony_evid100p.cpp.
void firevision::SonyEviD100PControl::open | ( | ) |
Open visca device.
Definition at line 152 of file sony_evid100p.cpp.
References fawkes::Exception::append(), firevision::ViscaControl::clear(), firevision::ViscaControl::close(), firevision::ViscaControl::open(), and firevision::ViscaControl::set_address().
Referenced by SonyEviD100PControl().
void firevision::SonyEviD100PControl::reset_effect | ( | ) | [virtual] |
Reset effect.
Disable all effects.
Implements firevision::CameraControlEffect.
Definition at line 463 of file sony_evid100p.cpp.
References firevision::ViscaControl::resetEffect().
void firevision::SonyEviD100PControl::set_effect | ( | unsigned int | effect | ) | [virtual] |
Enable effect.
effect | camera-specific effect. |
Implements firevision::CameraControlEffect.
Definition at line 417 of file sony_evid100p.cpp.
References firevision::ViscaControl::applyEffectBnW(), firevision::ViscaControl::applyEffectMosaic(), firevision::ViscaControl::applyEffectNegArt(), firevision::ViscaControl::applyEffectPastel(), firevision::ViscaControl::applyEffectSepia(), firevision::ViscaControl::applyEffectSlim(), firevision::ViscaControl::applyEffectSolarize(), firevision::ViscaControl::applyEffectStretch(), EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, firevision::CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, EFFECT_STRETCH, and firevision::ViscaControl::resetEffect().
bool firevision::SonyEviD100PControl::supports_effect | ( | unsigned int | effect | ) | [virtual] |
Check if camera control supports desired effect.
Use camera-specific constants.
effect | supported effect |
Implements firevision::CameraControlEffect.
Definition at line 393 of file sony_evid100p.cpp.
References EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, firevision::CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, and EFFECT_STRETCH.
unsigned int firevision::SonyEviD100PControl::white_balance_mode | ( | ) |
Get current white balance mode.
Definition at line 473 of file sony_evid100p.cpp.
References firevision::ViscaControl::getWhiteBalanceMode().
const unsigned int firevision::SonyEviD100PControl::EFFECT_BW = 4 [static] |
B/W effect.
Definition at line 50 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_MOSAIC = 6 [static] |
Mosaic effect.
Definition at line 52 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_NEGATIVE = 2 [static] |
Negative effect.
Definition at line 48 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_PASTEL = 1 [static] |
Pastel effect.
Definition at line 47 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_SEPIA = 3 [static] |
Sepia effect.
Definition at line 49 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_SLIM = 7 [static] |
Slim effect.
Definition at line 53 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_SOLARIZE = 5 [static] |
Solarize effect.
Definition at line 51 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int firevision::SonyEviD100PControl::EFFECT_STRETCH = 8 [static] |
Stretch effect.
Definition at line 54 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const int firevision::SonyEviD100PControl::MAX_PAN = 1440 [static] |
Maximum pan.
Definition at line 104 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MAX_PAN_DEG = 100.f [static] |
Max pan in degrees.
Definition at line 109 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MAX_PAN_RAD = deg2rad(MAX_PAN_DEG) [static] |
Max pan in rad.
Definition at line 114 of file sony_evid100p.h.
const int firevision::SonyEviD100PControl::MAX_TILT = 360 [static] |
Max Tilt.
Definition at line 106 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MAX_TILT_DEG = 25.f [static] |
Max tilt in degrees.
Definition at line 111 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MAX_TILT_RAD = deg2rad(MAX_TILT_DEG) [static] |
Max tilt in rad.
Definition at line 116 of file sony_evid100p.h.
const int firevision::SonyEviD100PControl::MIN_PAN = -1439 [static] |
Minimum pan.
Definition at line 105 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MIN_PAN_DEG = -100.f [static] |
Min pan in degrees.
Definition at line 110 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MIN_PAN_RAD = deg2rad(MIN_PAN_DEG) [static] |
Min pan in rad.
Definition at line 115 of file sony_evid100p.h.
const int firevision::SonyEviD100PControl::MIN_TILT = - 359 [static] |
Min tilt .
Definition at line 107 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MIN_TILT_DEG = - 25.f [static] |
Min tilt in degrees.
Definition at line 112 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::MIN_TILT_RAD = deg2rad(MIN_TILT_DEG) [static] |
Min tilt in rad.
Definition at line 117 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::PAN_STEPS_PER_DEG = MAX_PAN / MAX_PAN_DEG [static] |
Pan steps per degree.
Definition at line 119 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::PAN_STEPS_PER_RAD = MAX_PAN / MAX_PAN_RAD [static] |
Pan steps per rad.
Definition at line 122 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::TILT_STEPS_PER_DEG = MAX_TILT / MAX_TILT_DEG [static] |
Tilt steps per degree.
Definition at line 120 of file sony_evid100p.h.
const float firevision::SonyEviD100PControl::TILT_STEPS_PER_RAD = MAX_TILT / MAX_TILT_RAD [static] |
Tilt steps per rad.
Definition at line 123 of file sony_evid100p.h.