Visca Class Reference

Inheritance diagram for Visca:
Inheritance graph
[legend]
Collaboration diagram for Visca:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Visca (OptionManager &mgr, const std::string &descrName="Visca PTZ Controller", const std::string &tagName="ViscaPTZ", const char *defdev="/dev/ttyUSB1", const int cameraAddr=1)
 Default constructor; see ModelComponent.H.
 ~Visca ()
 Destructor.
virtual void start2 ()
 This is called from within start() after the subcomponents have started.
bool movePanTilt (const int pan, const int tilt, bool relative=false, const int panSpeed=5, const int tiltSpeed=5)
 Moves the camera, ptz.
bool resetPanTilt ()
 Reset the pan tilt.
bool zoom (const int val, bool relative=false)
 zoom to a given value with a given speed
bool setFocus (const int val, bool relative=false)
 set focus
bool setAutoFocus (const bool val)
 set Auto focus
bool setTargetTracking ()
 set the target tracking option in the camera
int getCurrentZoom ()
bool getPanTilt (short int &pan, short int &tilt)

Protected Member Functions

int sendRawCmd (const unsigned char *cmd, const int length)
 Send the packet to the serial port.

Protected Attributes

nub::soft_ref< SerialitsPort
 Serial port to use.

Detailed Description

Definition at line 47 of file Visca.H.


Constructor & Destructor Documentation

Visca::Visca ( OptionManager mgr,
const std::string descrName = "Visca PTZ Controller",
const std::string tagName = "ViscaPTZ",
const char *  defdev = "/dev/ttyUSB1",
const int  cameraAddr = 1 
)

Default constructor; see ModelComponent.H.

Definition at line 45 of file Visca.C.

References ModelComponent::addSubComponent(), and itsPort.

Visca::~Visca (  ) 

Destructor.

Definition at line 61 of file Visca.C.


Member Function Documentation

bool Visca::movePanTilt ( const int  pan,
const int  tilt,
bool  relative = false,
const int  panSpeed = 5,
const int  tiltSpeed = 5 
)

Moves the camera, ptz.

Returns true on success, false if some serial error occurred.

Definition at line 111 of file Visca.C.

References sendRawCmd().

bool Visca::resetPanTilt (  ) 

Reset the pan tilt.

Definition at line 205 of file Visca.C.

References sendRawCmd().

int Visca::sendRawCmd ( const unsigned char *  cmd,
const int  length 
) [protected]

Send the packet to the serial port.

Definition at line 65 of file Visca.C.

References itsPort.

Referenced by movePanTilt(), resetPanTilt(), setAutoFocus(), setFocus(), setTargetTracking(), and zoom().

bool Visca::setAutoFocus ( const bool  val  ) 

set Auto focus

Definition at line 286 of file Visca.C.

References sendRawCmd().

bool Visca::setFocus ( const int  val,
bool  relative = false 
)

set focus

Definition at line 261 of file Visca.C.

References sendRawCmd().

bool Visca::setTargetTracking (  ) 

set the target tracking option in the camera

Definition at line 313 of file Visca.C.

References sendRawCmd().

void Visca::start2 (  )  [virtual]

This is called from within start() after the subcomponents have started.

Reimplemented from ModelComponent.

Definition at line 106 of file Visca.C.

bool Visca::zoom ( const int  val,
bool  relative = false 
)

zoom to a given value with a given speed

Definition at line 219 of file Visca.C.

References sendRawCmd().


Member Data Documentation

Serial port to use.

Definition at line 94 of file Visca.H.

Referenced by sendRawCmd(), and Visca().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:26:31 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3