#include <cVISCA.h>
Public Member Functions | |
~cVISCA () | |
Destructor. | |
void | Log (int flag=1) |
Switch logging. | |
void | NoCameraResponse (int flag=1) |
Specify whether or not camera responses are expected. | |
void | ResetOnError (int flag=1) |
Specify whether or not a camera reset should be attempted when an error is detected. | |
void | setCameraIndex (int i) |
Specify which of the VISCA camera we want to communicate with. | |
int | SerialOpen (const char *device_name) |
Connect to the cameras. | |
void | SerialClose () |
Close connection. | |
int | Reset () |
Reset the cameras. | |
int | SetAddress (int *camera_num) |
Find how many cameras are on the VISCA connection. | |
int | clear () |
Broadcast a clear to all cameras. | |
int | get_camera_info (int &vendor, int &model) |
Read some information about the camera. | |
int | setLive (int i) |
Select the camera view to simulate. | |
int | pantilt_set (unsigned int pan_speed, unsigned int tilt_speed, int pan_position, int tilt_position) |
Send absolute pan and tilt position to camera. | |
int | pantilt_get_value (int &pan_pos, int &tilt_pos) |
Get absolute pan and tilt position from camera. | |
int | pantilt_drive_start (int leftright, int speed) |
Start Drive the pan_tilt camera. | |
int | pantilt_drive_stop () |
Stop Drive the pan_tilt camera. | |
int | pantilt_home () |
Move camera back to pan tilt home. | |
int | zoom_set_value (int value) |
Set the zooom. | |
int | zoom_get_value () |
Get current camera zoom value. | |
int | zoom_drive_start (int LRUDIO, int speed) |
Start zooming. | |
int | zoom_drive_stop () |
Stop the zoom drive. | |
int | set_focus_value (int value) |
Set the focus value. | |
int | IsSim () |
True if simulator running. | |
int | IsOpen () |
True if there is an open VISCA connection. | |
Public Attributes | |
int | myError |
They happen. |
Copyright (c) 2008 by James Bremner All rights reserved.
Use license: Modified from standard BSD license.
Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, Web server pages, and other materials related to such distribution and use acknowledge that the software was developed by James Bremner. The name "James Bremner" may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
Destructor. Closes log file. Closes serial connection. |
|
Read some information about the camera.
|
|
Switch logging.
|
|
Specify whether or not camera responses are expected.
If no camera responses are expected, the class makes do as best it can. In particular, the get position routines return the last ordered position |
|
Start Drive the pan_tilt camera.
|
|
Get absolute pan and tilt position from camera.
|
|
Send absolute pan and tilt position to camera.
|
|
Reset the cameras.
Updates myCameraNumber attribute |
|
Specify whether or not a camera reset should be attempted when an error is detected.
If resets are not set, a detected error will cause the class methods to return 0 and set the myError attribute. If resets are set, a detected error will cause the class to call the reset and THROW AN EXCEPTION. The exception will be an instance of the class Croak with attribute what = "Rest On Error". The class will be left in an undefined state, but the camera hardware should be reset and a call to any public class method should work correctly. |
|
Connect to the cameras.
The interface name "STB" switches on the camera stub API The interface name "SIM" switches on the camera simulation If the COM port is successfully opened, the cameras are reset and the number of cameras present are counted. If the reset does not respond as expected, or the number of cameras are not valid, then the connection is closed and failure is returned. This can happen if some other device, a modem perhaps, is present on the port. |
|
Set the focus value.
|
|
Find how many cameras are on the VISCA connection.
|
|
Specify which of the VISCA camera we want to communicate with.
|
|
Select the camera view to simulate.
|
|
Start zooming.
|
|
Get current camera zoom value.
|
|
Set the zooom.
|