Fawkes API  Fawkes Development Version
firevision::SonyEviD100PControl Class Reference

Sony Evi D100P pan/tilt control. More...

#include <>>

Inheritance diagram for firevision::SonyEviD100PControl:

Public Member Functions

 SonyEviD100PControl (const CameraArgumentParser *cap)
 Constructor. More...
 
 SonyEviD100PControl (const char *tty_port)
 Constructor. More...
 
virtual ~SonyEviD100PControl ()
 Destructor. More...
 
void open ()
 Open visca device. More...
 
void close ()
 Close Visca device. More...
 
void process_pantilt ()
 Process pan/tilt information. More...
 
bool supports_pan ()
 Check whether this controller supports panning. More...
 
bool supports_tilt ()
 Check whether this controller supports tilting. More...
 
void set_pan (int pan)
 Set pan value. More...
 
void set_tilt (int tilt)
 Set tilt value. More...
 
void set_pan_tilt (int pan, int tilt)
 Set pan and tilt in one go. More...
 
void set_pan_tilt_rad (float pan, float tilt)
 Set pan and tilt as float value. More...
 
int pan ()
 Get pan value. More...
 
int tilt ()
 Get tilt value. More...
 
void start_get_pan_tilt ()
 Start asynchronous fetch operation for pan and tilt values. More...
 
void pan_tilt (int &pan, int &tilt)
 Get pan and tilt at the same time. More...
 
void pan_tilt_rad (float &pan, float &tilt)
 Get pan and tilt at the same time in radiant. More...
 
int min_pan ()
 Get minimum pan value. More...
 
int max_pan ()
 Get maximum pan value. More...
 
int min_tilt ()
 Get minimum tilt value. More...
 
int max_tilt ()
 Get maximum tilt value. More...
 
void reset_pan_tilt ()
 Bring camera into home position. More...
 
void set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down)
 Set pan/tilt limits. More...
 
void reset_pan_tilt_limit ()
 Reset pan/tilt limits. More...
 
void reset_zoom ()
 Reset zoom. More...
 
void set_zoom (unsigned int zoom)
 Set new camera-specific zoom value. More...
 
unsigned int zoom ()
 Get current zoom value. More...
 
unsigned int zoom_max ()
 Maximum zoom value. More...
 
unsigned int zoom_min ()
 Minimum zoom value. More...
 
void set_zoom_speed_tele (unsigned int speed)
 Set speed in tele range. More...
 
void set_zoom_speed_wide (unsigned int speed)
 Set speed in wide range. More...
 
void set_zoom_digital_enabled (bool enabled)
 Set if digital zoom may be used. More...
 
unsigned int white_balance_mode ()
 Get current white balance mode. More...
 
bool supports_effect (unsigned int effect)
 Check if camera control supports desired effect. More...
 
void set_effect (unsigned int effect)
 Enable effect. More...
 
unsigned int effect ()
 Current effect. More...
 
void reset_effect ()
 Reset effect. More...
 
- Public Member Functions inherited from firevision::CameraControlPanTilt
virtual ~CameraControlPanTilt ()
 Empty virtual destructor. More...
 
- Public Member Functions inherited from firevision::CameraControl
virtual ~CameraControl ()
 Virtual empty destructor. More...
 
- Public Member Functions inherited from firevision::CameraControlZoom
virtual ~CameraControlZoom ()
 Empty virtual destructor. More...
 
- Public Member Functions inherited from firevision::CameraControlEffect
virtual ~CameraControlEffect ()
 Empty virtual destructor. More...
 

Static Public Attributes

static const unsigned int EFFECT_PASTEL = 1
 Pastel effect. More...
 
static const unsigned int EFFECT_NEGATIVE = 2
 Negative effect. More...
 
static const unsigned int EFFECT_SEPIA = 3
 Sepia effect. More...
 
static const unsigned int EFFECT_BW = 4
 B/W effect. More...
 
static const unsigned int EFFECT_SOLARIZE = 5
 Solarize effect. More...
 
static const unsigned int EFFECT_MOSAIC = 6
 Mosaic effect. More...
 
static const unsigned int EFFECT_SLIM = 7
 Slim effect. More...
 
static const unsigned int EFFECT_STRETCH = 8
 Stretch effect. More...
 
static const int MAX_PAN = 1440
 Maximum pan. More...
 
static const int MIN_PAN = -1439
 Minimum pan. More...
 
static const int MAX_TILT = 360
 Max Tilt. More...
 
static const int MIN_TILT = - 359
 Min tilt . More...
 
static const float MAX_PAN_DEG = 100.f
 Max pan in degrees. More...
 
static const float MIN_PAN_DEG = -100.f
 Min pan in degrees. More...
 
static const float MAX_TILT_DEG = 25.f
 Max tilt in degrees. More...
 
static const float MIN_TILT_DEG = - 25.f
 Min tilt in degrees. More...
 
static const float MAX_PAN_RAD = deg2rad(MAX_PAN_DEG)
 Max pan in rad. More...
 
static const float MIN_PAN_RAD = deg2rad(MIN_PAN_DEG)
 Min pan in rad. More...
 
static const float MAX_TILT_RAD = deg2rad(MAX_TILT_DEG)
 Max tilt in rad. More...
 
static const float MIN_TILT_RAD = deg2rad(MIN_TILT_DEG)
 Min tilt in rad. More...
 
static const float PAN_STEPS_PER_DEG = MAX_PAN / MAX_PAN_DEG
 Pan steps per degree. More...
 
static const float TILT_STEPS_PER_DEG = MAX_TILT / MAX_TILT_DEG
 Tilt steps per degree. More...
 
static const float PAN_STEPS_PER_RAD = MAX_PAN / MAX_PAN_RAD
 Pan steps per rad. More...
 
static const float TILT_STEPS_PER_RAD = MAX_TILT / MAX_TILT_RAD
 Tilt steps per rad. More...
 
- Static Public Attributes inherited from firevision::CameraControlEffect
static const unsigned int EFFECT_NONE = 0
 No effect constant. More...
 

Detailed Description

Sony Evi D100P pan/tilt control.

Internally uses Visca.

Author
Tim Niemueller

Definition at line 39 of file sony_evid100p.h.

Constructor & Destructor Documentation

◆ SonyEviD100PControl() [1/2]

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).

Parameters
capcamera argument parser

Definition at line 125 of file sony_evid100p.cpp.

References firevision::CameraArgumentParser::cam_id().

◆ SonyEviD100PControl() [2/2]

firevision::SonyEviD100PControl::SonyEviD100PControl ( const char *  tty_port)

Constructor.

Parameters
tty_portserial port (e.g. /dev/ttyS0)

Definition at line 107 of file sony_evid100p.cpp.

◆ ~SonyEviD100PControl()

firevision::SonyEviD100PControl::~SonyEviD100PControl ( )
virtual

Destructor.

Definition at line 140 of file sony_evid100p.cpp.

Member Function Documentation

◆ close()

void firevision::SonyEviD100PControl::close ( )

Close Visca device.

Definition at line 173 of file sony_evid100p.cpp.

◆ effect()

unsigned int firevision::SonyEviD100PControl::effect ( )
virtual

Current effect.

Returns
current effect.

Implements firevision::CameraControlEffect.

Definition at line 456 of file sony_evid100p.cpp.

◆ max_pan()

int firevision::SonyEviD100PControl::max_pan ( )
virtual

Get maximum pan value.

Returns
maximum camera-specific pan value

Implements firevision::CameraControlPanTilt.

Definition at line 285 of file sony_evid100p.cpp.

◆ max_tilt()

int firevision::SonyEviD100PControl::max_tilt ( )
virtual

Get maximum tilt value.

Returns
maximum camera-specific tilt value

Implements firevision::CameraControlPanTilt.

Definition at line 299 of file sony_evid100p.cpp.

◆ min_pan()

int firevision::SonyEviD100PControl::min_pan ( )
virtual

Get minimum pan value.

Returns
minimum camera-specific pan value

Implements firevision::CameraControlPanTilt.

Definition at line 292 of file sony_evid100p.cpp.

◆ min_tilt()

int firevision::SonyEviD100PControl::min_tilt ( )
virtual

Get minimum tilt value.

Returns
minimum camera-specific tilt value

Implements firevision::CameraControlPanTilt.

Definition at line 306 of file sony_evid100p.cpp.

◆ open()

void firevision::SonyEviD100PControl::open ( )

Open visca device.

Returns
true on success

Definition at line 152 of file sony_evid100p.cpp.

References fawkes::Exception::append().

◆ pan()

int firevision::SonyEviD100PControl::pan ( )
virtual

Get pan value.

Returns
camera control specific pan value

Implements firevision::CameraControlPanTilt.

Definition at line 267 of file sony_evid100p.cpp.

◆ pan_tilt()

void firevision::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
pancontains current pan after call
tiltcontains current tilt after call

Implements firevision::CameraControlPanTilt.

Definition at line 246 of file sony_evid100p.cpp.

◆ pan_tilt_rad()

void firevision::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
pancontains current pan after call
tiltcontains current tilt after call
See also
set_pan_tilt_rad()

Implements firevision::CameraControlPanTilt.

Definition at line 256 of file sony_evid100p.cpp.

◆ process_pantilt()

void firevision::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 firevision::CameraControlPanTilt.

Definition at line 181 of file sony_evid100p.cpp.

◆ reset_effect()

void firevision::SonyEviD100PControl::reset_effect ( )
virtual

Reset effect.

Disable all effects.

Implements firevision::CameraControlEffect.

Definition at line 463 of file sony_evid100p.cpp.

◆ reset_pan_tilt()

void firevision::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 firevision::CameraControlPanTilt.

Definition at line 313 of file sony_evid100p.cpp.

◆ reset_pan_tilt_limit()

void firevision::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 firevision::CameraControlPanTilt.

Definition at line 328 of file sony_evid100p.cpp.

◆ reset_zoom()

void firevision::SonyEviD100PControl::reset_zoom ( )
virtual

Reset zoom.

Exceptions
NotImplementedExceptionNot implemented by this control

Implements firevision::CameraControlZoom.

Definition at line 335 of file sony_evid100p.cpp.

◆ set_effect()

void firevision::SonyEviD100PControl::set_effect ( unsigned int  effect)
virtual

Enable effect.

Parameters
effectcamera-specific effect.

Implements firevision::CameraControlEffect.

Definition at line 417 of file sony_evid100p.cpp.

◆ set_pan()

void firevision::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
pannew pan value

Implements firevision::CameraControlPanTilt.

Definition at line 202 of file sony_evid100p.cpp.

◆ set_pan_tilt()

void firevision::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
pannew pan value
tiltnew tilt value

Implements firevision::CameraControlPanTilt.

Definition at line 218 of file sony_evid100p.cpp.

◆ set_pan_tilt_limit()

void firevision::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_leftnew minimum pan limit
pan_rightnew maximum pan limit
tilt_upnew minimum tilt limit
tilt_downnew maximum tilt limit

Implements firevision::CameraControlPanTilt.

Definition at line 320 of file sony_evid100p.cpp.

◆ set_pan_tilt_rad()

void firevision::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
pannew pan value in radiant
tiltnew tilt value in radiant

Implements firevision::CameraControlPanTilt.

Definition at line 227 of file sony_evid100p.cpp.

◆ set_tilt()

void firevision::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
tiltnew tilt value

Implements firevision::CameraControlPanTilt.

Definition at line 210 of file sony_evid100p.cpp.

◆ set_zoom()

void firevision::SonyEviD100PControl::set_zoom ( unsigned int  zoom)
virtual

Set new camera-specific zoom value.

Parameters
zoomzoom value

Implements firevision::CameraControlZoom.

Definition at line 342 of file sony_evid100p.cpp.

◆ set_zoom_digital_enabled()

void firevision::SonyEviD100PControl::set_zoom_digital_enabled ( bool  enabled)
virtual

Set if digital zoom may be used.

Parameters
enabledtrue, to enable digital zoom, false otherwise
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented from firevision::CameraControlZoom.

Definition at line 386 of file sony_evid100p.cpp.

◆ set_zoom_speed_tele()

void firevision::SonyEviD100PControl::set_zoom_speed_tele ( unsigned int  speed)
virtual

Set speed in tele range.

Parameters
speedcamera-specific speed value
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented from firevision::CameraControlZoom.

Definition at line 372 of file sony_evid100p.cpp.

◆ set_zoom_speed_wide()

void firevision::SonyEviD100PControl::set_zoom_speed_wide ( unsigned int  speed)
virtual

Set speed in wide range.

Parameters
speedcamera-specific speed value.
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented from firevision::CameraControlZoom.

Definition at line 379 of file sony_evid100p.cpp.

◆ start_get_pan_tilt()

void firevision::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 firevision::CameraControlPanTilt.

Definition at line 239 of file sony_evid100p.cpp.

◆ supports_effect()

bool firevision::SonyEviD100PControl::supports_effect ( unsigned int  effect)
virtual

Check if camera control supports desired effect.

Use camera-specific constants.

Parameters
effectsupported effect
Returns
true, if effect is supported, false otherwise

Implements firevision::CameraControlEffect.

Definition at line 393 of file sony_evid100p.cpp.

◆ supports_pan()

bool firevision::SonyEviD100PControl::supports_pan ( )
virtual

Check whether this controller supports panning.

Returns
true if panning is supported

Implements firevision::CameraControlPanTilt.

Definition at line 188 of file sony_evid100p.cpp.

◆ supports_tilt()

bool firevision::SonyEviD100PControl::supports_tilt ( )
virtual

Check whether this controller supports tilting.

Returns
true if tilting is supported

Implements firevision::CameraControlPanTilt.

Definition at line 195 of file sony_evid100p.cpp.

◆ tilt()

int firevision::SonyEviD100PControl::tilt ( )
virtual

Get tilt value.

Returns
camera control specific tilt value

Implements firevision::CameraControlPanTilt.

Definition at line 276 of file sony_evid100p.cpp.

◆ white_balance_mode()

unsigned int firevision::SonyEviD100PControl::white_balance_mode ( )

Get current white balance mode.

Returns
white balance mode

Definition at line 473 of file sony_evid100p.cpp.

◆ zoom()

unsigned int firevision::SonyEviD100PControl::zoom ( )
virtual

Get current zoom value.

Returns
current zoom value.

Implements firevision::CameraControlZoom.

Definition at line 349 of file sony_evid100p.cpp.

◆ zoom_max()

unsigned int firevision::SonyEviD100PControl::zoom_max ( )
virtual

Maximum zoom value.

Returns
maximum zoom value

Implements firevision::CameraControlZoom.

Definition at line 365 of file sony_evid100p.cpp.

◆ zoom_min()

unsigned int firevision::SonyEviD100PControl::zoom_min ( )
virtual

Minimum zoom value.

Returns
Minimum zoom value

Implements firevision::CameraControlZoom.

Definition at line 358 of file sony_evid100p.cpp.

Member Data Documentation

◆ EFFECT_BW

const unsigned int firevision::SonyEviD100PControl::EFFECT_BW = 4
static

B/W effect.

Definition at line 50 of file sony_evid100p.h.

◆ EFFECT_MOSAIC

const unsigned int firevision::SonyEviD100PControl::EFFECT_MOSAIC = 6
static

Mosaic effect.

Definition at line 52 of file sony_evid100p.h.

◆ EFFECT_NEGATIVE

const unsigned int firevision::SonyEviD100PControl::EFFECT_NEGATIVE = 2
static

Negative effect.

Definition at line 48 of file sony_evid100p.h.

◆ EFFECT_PASTEL

const unsigned int firevision::SonyEviD100PControl::EFFECT_PASTEL = 1
static

Pastel effect.

Definition at line 47 of file sony_evid100p.h.

◆ EFFECT_SEPIA

const unsigned int firevision::SonyEviD100PControl::EFFECT_SEPIA = 3
static

Sepia effect.

Definition at line 49 of file sony_evid100p.h.

◆ EFFECT_SLIM

const unsigned int firevision::SonyEviD100PControl::EFFECT_SLIM = 7
static

Slim effect.

Definition at line 53 of file sony_evid100p.h.

◆ EFFECT_SOLARIZE

const unsigned int firevision::SonyEviD100PControl::EFFECT_SOLARIZE = 5
static

Solarize effect.

Definition at line 51 of file sony_evid100p.h.

◆ EFFECT_STRETCH

const unsigned int firevision::SonyEviD100PControl::EFFECT_STRETCH = 8
static

Stretch effect.

Definition at line 54 of file sony_evid100p.h.

◆ MAX_PAN

const int firevision::SonyEviD100PControl::MAX_PAN = 1440
static

Maximum pan.

Definition at line 104 of file sony_evid100p.h.

◆ MAX_PAN_DEG

const float firevision::SonyEviD100PControl::MAX_PAN_DEG = 100.f
static

Max pan in degrees.

Definition at line 109 of file sony_evid100p.h.

◆ MAX_PAN_RAD

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.

◆ MAX_TILT

const int firevision::SonyEviD100PControl::MAX_TILT = 360
static

Max Tilt.

Definition at line 106 of file sony_evid100p.h.

◆ MAX_TILT_DEG

const float firevision::SonyEviD100PControl::MAX_TILT_DEG = 25.f
static

Max tilt in degrees.

Definition at line 111 of file sony_evid100p.h.

◆ MAX_TILT_RAD

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.

◆ MIN_PAN

const int firevision::SonyEviD100PControl::MIN_PAN = -1439
static

Minimum pan.

Definition at line 105 of file sony_evid100p.h.

◆ MIN_PAN_DEG

const float firevision::SonyEviD100PControl::MIN_PAN_DEG = -100.f
static

Min pan in degrees.

Definition at line 110 of file sony_evid100p.h.

◆ MIN_PAN_RAD

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.

◆ MIN_TILT

const int firevision::SonyEviD100PControl::MIN_TILT = - 359
static

Min tilt .

Definition at line 107 of file sony_evid100p.h.

◆ MIN_TILT_DEG

const float firevision::SonyEviD100PControl::MIN_TILT_DEG = - 25.f
static

Min tilt in degrees.

Definition at line 112 of file sony_evid100p.h.

◆ MIN_TILT_RAD

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.

◆ PAN_STEPS_PER_DEG

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.

◆ PAN_STEPS_PER_RAD

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.

◆ TILT_STEPS_PER_DEG

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.

◆ TILT_STEPS_PER_RAD

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.


The documentation for this class was generated from the following files: