|
Fawkes API
Fawkes Development Version
|
Sony EviD100P Visca controller. More...
#include "evid100p.h"

Public Member Functions | |
| SonyEviD100PVisca (const char *device_file, unsigned int def_timeout_ms=30, bool blocking=true) | |
| Constructor. | |
| ~SonyEviD100PVisca () | |
| Destructor. | |
| void | get_pan_tilt_rad (float &pan, float &tilt) |
| Get pan/tilt in radians. | |
| void | set_pan_tilt_rad (float pan, float tilt) |
| Set pan/tilt in radians. | |
| void | set_speed_radsec (float pan_speed, float tilt_speed) |
| Set speed given in rad/sec. | |
| void | get_speed_radsec (float &pan_speed, float &tilt_speed) |
| Get current speed in rad/sec. | |
| void | get_speed_limits (float &pan_min, float &pan_max, float &tilt_min, float &tilt_max) |
| Get speed limits. | |
Public Member Functions inherited from Visca | |
| Visca (const char *device_file, unsigned int def_timeout_ms=10, bool blocking=true) | |
| Constructor. | |
| virtual | ~Visca () |
| Destructor. | |
| void | open () |
| Open serial port. | |
| void | close () |
| Close port. | |
| void | set_address () |
| Set addresses of cameras. | |
| void | clear () |
| Clear command buffers. | |
| void | send () |
| Send outbound queue. | |
| void | recv (unsigned int timeout_ms=0xFFFFFFFF) |
| Receive data. | |
| void | recv_ack (unsigned int *socket=NULL) |
| Receive ACK packet. | |
| void | send_with_reply () |
| Send and wait for reply, blocking. | |
| void | send_nonblocking (unsigned int *socket=NULL) |
| Send non-blocking. | |
| void | cancel_command (unsigned int socket) |
| Cancel a running command. | |
| bool | data_available () |
| Check data availability. | |
| void | process () |
| Process incoming data. | |
| void | reset_pan_tilt () |
| Reset pan/tilt. | |
| void | start_get_pan_tilt () |
| Query for pan/tilt but do not wait until finished This will send an inquire to the camera that asks for pan/tilt values but it does not wait for the data! A later call to getPanTilt will then block and wait until the results arrive. | |
| void | set_pan_tilt (int pan, int tilt) |
| Set pan tilt. | |
| void | get_pan_tilt (int &pan, int &tilt) |
| Get pan and tilt values. | |
| void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
| Set pan tilt limit. | |
| void | reset_pan_tilt_limit () |
| Reset pan/tilt limit. | |
| void | set_pan_tilt_speed (unsigned char pan_speed, unsigned char tilt_speed) |
| Set pan/tilt speed. | |
| void | get_pan_tilt_speed (unsigned char &pan_speed, unsigned char &tilt_speed) |
| Get pan/tilt speed. | |
| bool | is_nonblocking_finished (unsigned int item) const |
| Check if a non-blocking operation has been finished. | |
| void | reset_zoom () |
| Reset zoom. | |
| void | set_zoom (unsigned int zoom) |
| Set zoom. | |
| void | get_zoom (unsigned int *zoom) |
| Get zoom. | |
| void | set_zoom_speed_tele (unsigned int speed) |
| Set zoom speed in tele. | |
| void | set_zoom_speed_wide (unsigned int speed) |
| Set zoom speed in wide angle. | |
| void | set_zoom_digital_enabled (bool enabled) |
| Enable or disable digital zoome. | |
| void | reset_effect () |
| Reset effects. | |
| void | apply_effect (unsigned char effect) |
| Apply effect. | |
| void | apply_effect_pastel () |
| Apply pastel effect. | |
| void | apply_effect_neg_art () |
| Apply negative art effect. | |
| void | apply_effect_sepia () |
| Apply sepia effect. | |
| void | apply_effect_bnw () |
| Apply B/W effect. | |
| void | apply_effect_solarize () |
| Apply solarize effect. | |
| void | apply_effect_mosaic () |
| Apply mosaic effect. | |
| void | apply_effect_slim () |
| Apply slim effect. | |
| void | apply_effect_stretch () |
| Apply stretch effect. | |
| unsigned int | get_white_balance_mode () |
| Get white balance mode. | |
Static Public Attributes | |
| 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. | |
| 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 float | SPEED_TABLE_PAN [SONY_EVID100P_NUM_PAN_SPEEDS] |
| Speed table for supported pan speed values in radians. | |
| static const float | SPEED_TABLE_TILT [SONY_EVID100P_NUM_TILT_SPEEDS] |
| Speed table for supported tilt speed values in radians. | |
Static Public Attributes inherited from Visca | |
| static const unsigned int | VISCA_WHITEBLANCE_AUTO = VISCA_WB_AUTO |
| Automatic white balance. | |
| static const unsigned int | VISCA_WHITEBALANCE_INDOOR = VISCA_WB_INDOOR |
| Indoor white balance preset. | |
| static const unsigned int | VISCA_WHITEBALANCE_OUTDOOR = VISCA_WB_OUTDOOR |
| Outdoor white balance preset. | |
| static const unsigned int | VISCA_WHITEBALANCE_ONE_PUSH = VISCA_WB_ONE_PUSH |
| One push white balance preset. | |
| static const unsigned int | VISCA_WHITEBALANCE_ATW = VISCA_WB_ATW |
| ATW white balance preset. | |
| static const unsigned int | VISCA_WHITEBALANCE_MANUAL = VISCA_WB_MANUAL |
| Manual white balance. | |
| static const unsigned int | NONBLOCKING_PANTILT = 0 |
| Non-blocking pan/tilt item. | |
| static const unsigned int | NONBLOCKING_ZOOM = 1 |
| Non-blocking zoom item. | |
| static const unsigned int | NONBLOCKING_NUM = 2 |
| Number of non-blocking items. | |
| static const unsigned int | MAX_PAN_SPEED = 0x18 |
| Number of non-blocking items. | |
| static const unsigned int | MAX_TILT_SPEED = 0x14 |
| Number of non-blocking items. | |
Sony EviD100P Visca controller.
This sub-class using the Visca protocol contains some constants specific for the Sony EviD100P camera.
Definition at line 32 of file evid100p.h.
| SonyEviD100PVisca::SonyEviD100PVisca | ( | const char * | device_file, |
| unsigned int | def_timeout_ms = 30, |
||
| bool | blocking = true |
||
| ) |
Constructor.
| device_file | serial device file (e.g. /dev/ttyUSB0) |
| def_timeout_ms | default read timeout, used if no specific timeout is passed |
| blocking | true to make gathering pan/tilt information wait for the reponse, false to be able to split the operation |
Definition at line 117 of file evid100p.cpp.
| SonyEviD100PVisca::~SonyEviD100PVisca | ( | ) |
Destructor.
Definition at line 126 of file evid100p.cpp.
| void SonyEviD100PVisca::get_pan_tilt_rad | ( | float & | pan, |
| float & | tilt | ||
| ) |
Get pan/tilt in radians.
| pan | upon return contains the current pan value |
| tilt | upone return contains the current tilt value |
Definition at line 159 of file evid100p.cpp.
References Visca::get_pan_tilt(), and PAN_STEPS_PER_RAD.
| void SonyEviD100PVisca::get_speed_limits | ( | float & | pan_min, |
| float & | pan_max, | ||
| float & | tilt_min, | ||
| float & | tilt_max | ||
| ) |
Get speed limits.
| pan_min | minimum pan speed possible |
| pan_max | maximum pan speed possible |
| tilt_min | minimum tilt speed possible |
| tilt_max | maximum tilt speed possible |
Definition at line 243 of file evid100p.cpp.
References SPEED_TABLE_PAN, and SPEED_TABLE_TILT.
Referenced by PanTiltSonyEviD100PThread::init().
| void SonyEviD100PVisca::get_speed_radsec | ( | float & | pan_speed, |
| float & | tilt_speed | ||
| ) |
Get current speed in rad/sec.
| pan_speed | upon return contains pan speed in rad/sec |
| tilt_speed | upon return contains tilt speed in rad/sec |
Definition at line 227 of file evid100p.cpp.
References Visca::get_pan_tilt_speed(), SPEED_TABLE_PAN, and SPEED_TABLE_TILT.
| void SonyEviD100PVisca::set_pan_tilt_rad | ( | float | pan, |
| float | tilt | ||
| ) |
Set pan/tilt in radians.
| pan | pan value in radians |
| tilt | tilt value in radians |
Definition at line 136 of file evid100p.cpp.
References MAX_PAN_RAD, MAX_TILT_RAD, MIN_PAN_RAD, MIN_TILT_RAD, PAN_STEPS_PER_RAD, Visca::set_pan_tilt(), and TILT_STEPS_PER_RAD.
| void SonyEviD100PVisca::set_speed_radsec | ( | float | pan_speed, |
| float | tilt_speed | ||
| ) |
Set speed given in rad/sec.
Note that not the exact speed is taken, but rather the closes equivalent in motor ticks is taken.
| pan_speed | desired pan speed in rad/sec |
| tilt_speed | desired tilt speed in rad/sec |
| OutOfBoundsException | thrown if desired speed is out of range |
Definition at line 177 of file evid100p.cpp.
References Visca::set_pan_tilt_speed(), SPEED_TABLE_PAN, and SPEED_TABLE_TILT.
|
static |
B/W effect.
Definition at line 72 of file evid100p.h.
|
static |
Mosaic effect.
Definition at line 74 of file evid100p.h.
|
static |
Negative effect.
Definition at line 70 of file evid100p.h.
|
static |
Pastel effect.
Definition at line 69 of file evid100p.h.
|
static |
Sepia effect.
Definition at line 71 of file evid100p.h.
|
static |
Slim effect.
Definition at line 75 of file evid100p.h.
|
static |
Solarize effect.
Definition at line 73 of file evid100p.h.
|
static |
Stretch effect.
Definition at line 76 of file evid100p.h.
|
static |
Maximum pan.
Definition at line 48 of file evid100p.h.
|
static |
Max pan in degrees.
Definition at line 53 of file evid100p.h.
|
static |
Max pan in rad.
Definition at line 58 of file evid100p.h.
Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().
|
static |
Max Tilt.
Definition at line 50 of file evid100p.h.
|
static |
Max tilt in degrees.
Definition at line 55 of file evid100p.h.
|
static |
Max tilt in rad.
Definition at line 60 of file evid100p.h.
Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().
|
static |
Minimum pan.
Definition at line 49 of file evid100p.h.
|
static |
Min pan in degrees.
Definition at line 54 of file evid100p.h.
|
static |
Min pan in rad.
Definition at line 59 of file evid100p.h.
Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().
|
static |
Min tilt .
Definition at line 51 of file evid100p.h.
|
static |
Min tilt in degrees.
Definition at line 56 of file evid100p.h.
|
static |
Min tilt in rad.
Definition at line 61 of file evid100p.h.
Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().
|
static |
Pan steps per degree.
Definition at line 63 of file evid100p.h.
|
static |
Pan steps per rad.
Definition at line 66 of file evid100p.h.
Referenced by get_pan_tilt_rad(), and set_pan_tilt_rad().
|
static |
Speed table for supported pan speed values in radians.
Has been created empirically.
Definition at line 78 of file evid100p.h.
Referenced by get_speed_limits(), get_speed_radsec(), and set_speed_radsec().
|
static |
Speed table for supported tilt speed values in radians.
Has been created empirically.
Definition at line 79 of file evid100p.h.
Referenced by get_speed_limits(), get_speed_radsec(), and set_speed_radsec().
|
static |
Tilt steps per degree.
Definition at line 64 of file evid100p.h.
|
static |