SonyEviD100PControl Class Reference
Sony Evi D100P pan/tilt control. More...
#include <cams/control/sony_evid100p.h>

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 () |
| Process pan/tilt information. | |
| bool | supports_pan () |
| Check whether this controller supports panning. | |
| bool | supports_tilt () |
| Check whether this controller supports tilting. | |
| void | set_pan (int pan) |
| Set pan value. | |
| void | set_tilt (int tilt) |
| Set tilt value. | |
| void | set_pan_tilt (int pan, int tilt) |
| Set pan and tilt in one go. | |
| void | set_pan_tilt_rad (float pan, float tilt) |
| Set pan and tilt as float value. | |
| int | pan () |
| Get pan value. | |
| int | tilt () |
| Get tilt value. | |
| void | start_get_pan_tilt () |
| Start asynchronous fetch operation for pan and tilt values. | |
| void | pan_tilt (int &pan, int &tilt) |
| Get pan and tilt at the same time. | |
| void | pan_tilt_rad (float &pan, float &tilt) |
| Get pan and tilt at the same time in radiant. | |
| int | min_pan () |
| Get minimum pan value. | |
| int | max_pan () |
| Get maximum pan value. | |
| int | min_tilt () |
| Get minimum tilt value. | |
| int | max_tilt () |
| Get maximum tilt value. | |
| void | reset_pan_tilt () |
| Bring camera into home position. | |
| void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
| Set pan/tilt limits. | |
| void | reset_pan_tilt_limit () |
| Reset pan/tilt limits. | |
| void | reset_zoom () |
| Reset zoom. | |
| void | set_zoom (unsigned int zoom) |
| Set new camera-specific zoom value. | |
| unsigned int | zoom () |
| Get current zoom value. | |
| unsigned int | zoom_max () |
| Maximum zoom value. | |
| unsigned int | zoom_min () |
| Minimum zoom value. | |
| void | set_zoom_speed_tele (unsigned int speed) |
| Set speed in tele range. | |
| void | set_zoom_speed_wide (unsigned int speed) |
| Set speed in wide range. | |
| void | set_zoom_digital_enabled (bool enabled) |
| Set if digital zoom may be used. | |
| 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. | |
Detailed Description
Sony Evi D100P pan/tilt control.Internally uses Visca.
Definition at line 34 of file sony_evid100p.h.
Constructor & Destructor Documentation
| 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).
- Parameters:
-
cap camera argument parser
Definition at line 120 of file sony_evid100p.cpp.
References CameraArgumentParser::cam_id(), CameraControlEffect::EFFECT_NONE, and open().
| SonyEviD100PControl::SonyEviD100PControl | ( | const char * | tty_port | ) |
Constructor.
- Parameters:
-
tty_port serial port (e.g. /dev/ttyS0)
Definition at line 102 of file sony_evid100p.cpp.
References CameraControlEffect::EFFECT_NONE, and open().
| SonyEviD100PControl::~SonyEviD100PControl | ( | ) | [virtual] |
Member Function Documentation
| void SonyEviD100PControl::close | ( | ) |
Close Visca device.
Definition at line 168 of file sony_evid100p.cpp.
References ViscaControl::close().
Referenced by ~SonyEviD100PControl().
| unsigned int SonyEviD100PControl::effect | ( | ) | [virtual] |
Current effect.
- Returns:
- current effect.
Implements CameraControlEffect.
Definition at line 451 of file sony_evid100p.cpp.
| int SonyEviD100PControl::max_pan | ( | ) | [virtual] |
Get maximum pan value.
- Returns:
- maximum camera-specific pan value
Implements CameraControlPanTilt.
Definition at line 280 of file sony_evid100p.cpp.
References MAX_PAN.
| int SonyEviD100PControl::max_tilt | ( | ) | [virtual] |
Get maximum tilt value.
- Returns:
- maximum camera-specific tilt value
Implements CameraControlPanTilt.
Definition at line 294 of file sony_evid100p.cpp.
References MAX_TILT.
| int SonyEviD100PControl::min_pan | ( | ) | [virtual] |
Get minimum pan value.
- Returns:
- minimum camera-specific pan value
Implements CameraControlPanTilt.
Definition at line 287 of file sony_evid100p.cpp.
References MIN_PAN.
| int SonyEviD100PControl::min_tilt | ( | ) | [virtual] |
Get minimum tilt value.
- Returns:
- minimum camera-specific tilt value
Implements CameraControlPanTilt.
Definition at line 301 of file sony_evid100p.cpp.
References MIN_TILT.
| void SonyEviD100PControl::open | ( | ) |
Open visca device.
- Returns:
- true on success
Definition at line 147 of file sony_evid100p.cpp.
References fawkes::Exception::append(), ViscaControl::clear(), ViscaControl::close(), ViscaControl::open(), and ViscaControl::set_address().
Referenced by SonyEviD100PControl().
| int SonyEviD100PControl::pan | ( | ) | [virtual] |
Get pan value.
- Returns:
- camera control specific pan value
Implements CameraControlPanTilt.
Definition at line 262 of file sony_evid100p.cpp.
References ViscaControl::getPanTilt(), and tilt().
Referenced by tilt().
| void SonyEviD100PControl::pan_tilt | ( | int & | pan, | |
| int & | tilt | |||
| ) | [virtual] |
Get pan and tilt at the same time.
This will store the current pan and tilt values in the given arguments.
- Parameters:
-
pan contains current pan after call tilt contains current tilt after call
Implements CameraControlPanTilt.
Definition at line 241 of file sony_evid100p.cpp.
References ViscaControl::getPanTilt().
| void SonyEviD100PControl::pan_tilt_rad | ( | float & | pan, | |
| float & | tilt | |||
| ) | [virtual] |
Get pan and tilt at the same time in radiant.
This will store the current pan and tilt values in the given arguments.
- Parameters:
-
pan contains current pan after call tilt contains current tilt after call
- See also:
- set_pan_tilt_rad()
Implements CameraControlPanTilt.
Definition at line 251 of file sony_evid100p.cpp.
References ViscaControl::getPanTilt(), and PAN_STEPS_PER_RAD.
| void SonyEviD100PControl::process_pantilt | ( | ) | [virtual] |
Process pan/tilt information.
Some operations allow for asynchronous usage (like fetching pan/tilt data). This is because some cameras need some time to retrieve the information and thus it is a good idea to let that run besides the image processing loop. With process_control the incoming information is processed.
Implements CameraControlPanTilt.
Definition at line 176 of file sony_evid100p.cpp.
References ViscaControl::process().
| void SonyEviD100PControl::reset_effect | ( | ) | [virtual] |
Reset effect.
Disable all effects.
Implements CameraControlEffect.
Definition at line 458 of file sony_evid100p.cpp.
References ViscaControl::resetEffect().
| void SonyEviD100PControl::reset_pan_tilt | ( | ) | [virtual] |
Bring camera into home position.
After the reset the camera shall look forward (horizontally and vertically centered "home" position).
Implements CameraControlPanTilt.
Definition at line 308 of file sony_evid100p.cpp.
References ViscaControl::resetPanTilt().
| void SonyEviD100PControl::reset_pan_tilt_limit | ( | ) | [virtual] |
Reset pan/tilt limits.
This removes all limits from the pan/tilt methods thus the only constraints are hardware induced.
Implements CameraControlPanTilt.
Definition at line 323 of file sony_evid100p.cpp.
References ViscaControl::resetPanTiltLimit().
| void SonyEviD100PControl::reset_zoom | ( | ) | [virtual] |
Reset zoom.
- Exceptions:
-
NotImplementedException Not implemented by this control
Implements CameraControlZoom.
Definition at line 330 of file sony_evid100p.cpp.
References ViscaControl::resetZoom().
| void SonyEviD100PControl::set_effect | ( | unsigned int | effect | ) | [virtual] |
Enable effect.
- Parameters:
-
effect camera-specific effect.
Implements CameraControlEffect.
Definition at line 412 of file sony_evid100p.cpp.
References ViscaControl::applyEffectBnW(), ViscaControl::applyEffectMosaic(), ViscaControl::applyEffectNegArt(), ViscaControl::applyEffectPastel(), ViscaControl::applyEffectSepia(), ViscaControl::applyEffectSlim(), ViscaControl::applyEffectSolarize(), ViscaControl::applyEffectStretch(), EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, EFFECT_STRETCH, and ViscaControl::resetEffect().
| void SonyEviD100PControl::set_pan | ( | int | pan | ) | [virtual] |
Set pan value.
The pan value is dependent on the camera control. See the implementations documentation for details.
- Parameters:
-
pan new pan value
Implements CameraControlPanTilt.
Definition at line 197 of file sony_evid100p.cpp.
References ViscaControl::setPanTilt().
| void SonyEviD100PControl::set_pan_tilt | ( | int | pan, | |
| int | tilt | |||
| ) | [virtual] |
Set pan and tilt in one go.
Sometimes camera controls have a command for setting pan and tilt at the same time. If possible this should be preferred since is minimizes the number of required operations and communication acts. See the implementations documentation for details.
- Parameters:
-
pan new pan value tilt new tilt value
Implements CameraControlPanTilt.
Definition at line 213 of file sony_evid100p.cpp.
References ViscaControl::setPanTilt().
Referenced by set_pan_tilt_rad().
| void SonyEviD100PControl::set_pan_tilt_limit | ( | int | pan_left, | |
| int | pan_right, | |||
| int | tilt_up, | |||
| int | tilt_down | |||
| ) | [virtual] |
Set pan/tilt limits.
Some camera controls allow for extra constraints to the min and max pan/tilt values.
- Parameters:
-
pan_left new minimum pan limit pan_right new maximum pan limit tilt_up new minimum tilt limit tilt_down new maximum tilt limit
Implements CameraControlPanTilt.
Definition at line 315 of file sony_evid100p.cpp.
References ViscaControl::setPanTiltLimit().
| void SonyEviD100PControl::set_pan_tilt_rad | ( | float | pan, | |
| float | tilt | |||
| ) | [virtual] |
Set pan and tilt as float value.
You give a radiant value where the camera should head relative to the basic camera position. Implementations shall look forward (center the camera) for if pan equals zero, look right if the pan is positive and left is the pan is negative, they shall look forward (vertically centered) if tilt is zero, upwards if tilt is negative and downwards if tilt is positive.
- Parameters:
-
pan new pan value in radiant tilt new tilt value in radiant
Implements CameraControlPanTilt.
Definition at line 222 of file sony_evid100p.cpp.
References PAN_STEPS_PER_RAD, set_pan_tilt(), and TILT_STEPS_PER_RAD.
| void SonyEviD100PControl::set_tilt | ( | int | tilt | ) | [virtual] |
Set tilt value.
The tilt value is dependent on the camera control. See the implementations documentation for details.
- Parameters:
-
tilt new tilt value
Implements CameraControlPanTilt.
Definition at line 205 of file sony_evid100p.cpp.
References ViscaControl::setPanTilt().
| void SonyEviD100PControl::set_zoom | ( | unsigned int | zoom | ) | [virtual] |
Set new camera-specific zoom value.
- Parameters:
-
zoom zoom value
Implements CameraControlZoom.
Definition at line 337 of file sony_evid100p.cpp.
References ViscaControl::setZoom().
| void SonyEviD100PControl::set_zoom_digital_enabled | ( | bool | enabled | ) | [virtual] |
Set if digital zoom may be used.
- Parameters:
-
enabled true, to enable digital zoom, false otherwise
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
Definition at line 381 of file sony_evid100p.cpp.
References ViscaControl::setZoomDigitalEnabled().
| void SonyEviD100PControl::set_zoom_speed_tele | ( | unsigned int | speed | ) | [virtual] |
Set speed in tele range.
- Parameters:
-
speed camera-specific speed value
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
Definition at line 367 of file sony_evid100p.cpp.
References ViscaControl::setZoomSpeedTele().
| void SonyEviD100PControl::set_zoom_speed_wide | ( | unsigned int | speed | ) | [virtual] |
Set speed in wide range.
- Parameters:
-
speed camera-specific speed value.
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
Definition at line 374 of file sony_evid100p.cpp.
References ViscaControl::setZoomSpeedWide().
| void SonyEviD100PControl::start_get_pan_tilt | ( | ) | [virtual] |
Start asynchronous fetch operation for pan and tilt values.
This will initiate fetching the pan and tilt values but will not wait until the values have been received but will return immediately (non-blocking).
Implements CameraControlPanTilt.
Definition at line 234 of file sony_evid100p.cpp.
References ViscaControl::startGetPanTilt().
| bool SonyEviD100PControl::supports_effect | ( | unsigned int | effect | ) | [virtual] |
Check if camera control supports desired effect.
Use camera-specific constants.
- Parameters:
-
effect supported effect
- Returns:
- true, if effect is supported, false otherwise
Implements CameraControlEffect.
Definition at line 388 of file sony_evid100p.cpp.
References EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, and EFFECT_STRETCH.
| bool SonyEviD100PControl::supports_pan | ( | ) | [virtual] |
Check whether this controller supports panning.
- Returns:
- true if panning is supported
Implements CameraControlPanTilt.
Definition at line 183 of file sony_evid100p.cpp.
| bool SonyEviD100PControl::supports_tilt | ( | ) | [virtual] |
Check whether this controller supports tilting.
- Returns:
- true if tilting is supported
Implements CameraControlPanTilt.
Definition at line 190 of file sony_evid100p.cpp.
| int SonyEviD100PControl::tilt | ( | ) | [virtual] |
Get tilt value.
- Returns:
- camera control specific tilt value
Implements CameraControlPanTilt.
Definition at line 271 of file sony_evid100p.cpp.
References ViscaControl::getPanTilt(), and pan().
Referenced by pan().
| unsigned int SonyEviD100PControl::white_balance_mode | ( | ) |
Get current white balance mode.
- Returns:
- white balance mode
Definition at line 468 of file sony_evid100p.cpp.
References ViscaControl::getWhiteBalanceMode().
| unsigned int SonyEviD100PControl::zoom | ( | ) | [virtual] |
Get current zoom value.
- Returns:
- current zoom value.
Implements CameraControlZoom.
Definition at line 344 of file sony_evid100p.cpp.
References ViscaControl::getZoom().
| unsigned int SonyEviD100PControl::zoom_max | ( | ) | [virtual] |
Maximum zoom value.
- Returns:
- maximum zoom value
Implements CameraControlZoom.
Definition at line 360 of file sony_evid100p.cpp.
| unsigned int SonyEviD100PControl::zoom_min | ( | ) | [virtual] |
Minimum zoom value.
- Returns:
- Minimum zoom value
Implements CameraControlZoom.
Definition at line 353 of file sony_evid100p.cpp.
Member Data Documentation
const unsigned int SonyEviD100PControl::EFFECT_BW = 4 [static] |
B/W effect.
Definition at line 45 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_MOSAIC = 6 [static] |
Mosaic effect.
Definition at line 47 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_NEGATIVE = 2 [static] |
Negative effect.
Definition at line 43 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_PASTEL = 1 [static] |
Pastel effect.
Definition at line 42 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_SEPIA = 3 [static] |
Sepia effect.
Definition at line 44 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_SLIM = 7 [static] |
Slim effect.
Definition at line 48 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_SOLARIZE = 5 [static] |
Solarize effect.
Definition at line 46 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const unsigned int SonyEviD100PControl::EFFECT_STRETCH = 8 [static] |
Stretch effect.
Definition at line 49 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
const int SonyEviD100PControl::MAX_PAN = 1440 [static] |
const float SonyEviD100PControl::MAX_PAN_DEG = 100.f [static] |
const float SonyEviD100PControl::MAX_PAN_RAD = deg2rad(MAX_PAN_DEG) [static] |
const int SonyEviD100PControl::MAX_TILT = 360 [static] |
const float SonyEviD100PControl::MAX_TILT_DEG = 25.f [static] |
const float SonyEviD100PControl::MAX_TILT_RAD = deg2rad(MAX_TILT_DEG) [static] |
const int SonyEviD100PControl::MIN_PAN = -1439 [static] |
const float SonyEviD100PControl::MIN_PAN_DEG = -100.f [static] |
const float SonyEviD100PControl::MIN_PAN_RAD = deg2rad(MIN_PAN_DEG) [static] |
const int SonyEviD100PControl::MIN_TILT = - 359 [static] |
const float SonyEviD100PControl::MIN_TILT_DEG = - 25.f [static] |
const float SonyEviD100PControl::MIN_TILT_RAD = deg2rad(MIN_TILT_DEG) [static] |
const float SonyEviD100PControl::PAN_STEPS_PER_DEG = MAX_PAN / MAX_PAN_DEG [static] |
const float SonyEviD100PControl::PAN_STEPS_PER_RAD = MAX_PAN / MAX_PAN_RAD [static] |
Pan steps per rad.
Definition at line 117 of file sony_evid100p.h.
Referenced by pan_tilt_rad(), and set_pan_tilt_rad().
const float SonyEviD100PControl::TILT_STEPS_PER_DEG = MAX_TILT / MAX_TILT_DEG [static] |
const float SonyEviD100PControl::TILT_STEPS_PER_RAD = MAX_TILT / MAX_TILT_RAD [static] |
Tilt steps per rad.
Definition at line 118 of file sony_evid100p.h.
Referenced by set_pan_tilt_rad().
The documentation for this class was generated from the following files:
- src/firevision/cams/control/sony_evid100p.h
- src/firevision/cams/control/sony_evid100p.cpp

