Fawkes API Fawkes Development Version

SonyEviD100PVisca Class Reference

Sony EviD100P Visca controller. More...

#include "evid100p.h"

Inheritance diagram for SonyEviD100PVisca:

List of all members.

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.

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.

Detailed Description

Sony EviD100P Visca controller.

This sub-class using the Visca protocol contains some constants specific for the Sony EviD100P camera.

Author:
Tim Niemueller

Definition at line 32 of file evid100p.h.


Constructor & Destructor Documentation

SonyEviD100PVisca::SonyEviD100PVisca ( const char *  device_file,
unsigned int  def_timeout_ms = 30,
bool  blocking = true 
)

Constructor.

Parameters:
device_fileserial device file (e.g. /dev/ttyUSB0)
def_timeout_msdefault read timeout, used if no specific timeout is passed
blockingtrue 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.


Member Function Documentation

void SonyEviD100PVisca::get_pan_tilt_rad ( float &  pan,
float &  tilt 
)

Get pan/tilt in radians.

Parameters:
panupon return contains the current pan value
tiltupone 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.

Parameters:
pan_minminimum pan speed possible
pan_maxmaximum pan speed possible
tilt_minminimum tilt speed possible
tilt_maxmaximum tilt speed possible

Definition at line 243 of file evid100p.cpp.

References SPEED_TABLE_PAN, and SPEED_TABLE_TILT.

void SonyEviD100PVisca::get_speed_radsec ( float &  pan_speed,
float &  tilt_speed 
)

Get current speed in rad/sec.

Parameters:
pan_speedupon return contains pan speed in rad/sec
tilt_speedupon 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.

Parameters:
panpan value in radians
tilttilt 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.

Parameters:
pan_speeddesired pan speed in rad/sec
tilt_speeddesired tilt speed in rad/sec
Exceptions:
OutOfBoundsExceptionthrown 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.


Member Data Documentation

const unsigned int SonyEviD100PVisca::EFFECT_BW = 4 [static]

B/W effect.

Definition at line 72 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_MOSAIC = 6 [static]

Mosaic effect.

Definition at line 74 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_NEGATIVE = 2 [static]

Negative effect.

Definition at line 70 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_PASTEL = 1 [static]

Pastel effect.

Definition at line 69 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_SEPIA = 3 [static]

Sepia effect.

Definition at line 71 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_SLIM = 7 [static]

Slim effect.

Definition at line 75 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_SOLARIZE = 5 [static]

Solarize effect.

Definition at line 73 of file evid100p.h.

const unsigned int SonyEviD100PVisca::EFFECT_STRETCH = 8 [static]

Stretch effect.

Definition at line 76 of file evid100p.h.

const int SonyEviD100PVisca::MAX_PAN = 1440 [static]

Maximum pan.

Definition at line 48 of file evid100p.h.

const float SonyEviD100PVisca::MAX_PAN_DEG = 100.f [static]

Max pan in degrees.

Definition at line 53 of file evid100p.h.

const float SonyEviD100PVisca::MAX_PAN_RAD = deg2rad(MAX_PAN_DEG) [static]

Max pan in rad.

Definition at line 58 of file evid100p.h.

Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().

const int SonyEviD100PVisca::MAX_TILT = 360 [static]

Max Tilt.

Definition at line 50 of file evid100p.h.

const float SonyEviD100PVisca::MAX_TILT_DEG = 25.f [static]

Max tilt in degrees.

Definition at line 55 of file evid100p.h.

const float SonyEviD100PVisca::MAX_TILT_RAD = deg2rad(MAX_TILT_DEG) [static]

Max tilt in rad.

Definition at line 60 of file evid100p.h.

Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().

const int SonyEviD100PVisca::MIN_PAN = -1439 [static]

Minimum pan.

Definition at line 49 of file evid100p.h.

const float SonyEviD100PVisca::MIN_PAN_DEG = -100.f [static]

Min pan in degrees.

Definition at line 54 of file evid100p.h.

const float SonyEviD100PVisca::MIN_PAN_RAD = deg2rad(MIN_PAN_DEG) [static]

Min pan in rad.

Definition at line 59 of file evid100p.h.

Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().

const int SonyEviD100PVisca::MIN_TILT = - 359 [static]

Min tilt .

Definition at line 51 of file evid100p.h.

const float SonyEviD100PVisca::MIN_TILT_DEG = - 25.f [static]

Min tilt in degrees.

Definition at line 56 of file evid100p.h.

const float SonyEviD100PVisca::MIN_TILT_RAD = deg2rad(MIN_TILT_DEG) [static]

Min tilt in rad.

Definition at line 61 of file evid100p.h.

Referenced by PanTiltSonyEviD100PThread::init(), and set_pan_tilt_rad().

Pan steps per degree.

Definition at line 63 of file evid100p.h.

Pan steps per rad.

Definition at line 66 of file evid100p.h.

Referenced by get_pan_tilt_rad(), and set_pan_tilt_rad().

const float SonyEviD100PVisca::SPEED_TABLE_PAN [static]
Initial value:
  {0.03548, 0.04138, 0.05319, 0.06497, 0.08262, 0.10608, 0.12951, 0.15865,
   0.19933, 0.24535, 0.30159, 0.35137, 0.43540, 0.53611, 0.67246, 0.81519,
   0.99870, 1.20673, 1.45304, 1.70703, 1.99278, 2.25729, 2.44293, 2.71852}

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

Initial value:
  {0.03541, 0.04127, 0.05298, 0.06449, 0.08195, 0.10480, 0.12741, 0.15535,
   0.19356, 0.23685, 0.28438, 0.33367, 0.41066, 0.49517, 0.59622, 0.71474,
   0.83085, 0.97431, 1.08745, 1.20977}

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

Tilt steps per degree.

Definition at line 64 of file evid100p.h.

Tilt steps per rad.

Definition at line 67 of file evid100p.h.

Referenced by set_pan_tilt_rad().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends