Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ArVCC4Commands Class Reference

A class with the commands for the VCC4. More...

#include <ArVCC4.h>

List of all members.

Public Types

enum  Command {
  DELIM = 0x00, DEVICEID = 0x30, PANSLEW = 0x50, TILTSLEW = 0x51,
  STOP = 0x53, INIT = 0x58, SLEWREQ = 0x59, ANGLEREQ = 0x5c,
  PANTILT = 0x62, SETRANGE = 0x64, PANTILTREQ = 0x63, INFRARED = 0x76,
  PRODUCTNAME = 0x87, LEDCONTROL = 0x8E, CONTROL = 0x90, POWER = 0xA0,
  AUTOFOCUS = 0xA1, ZOOMSTOP = 0xA2, GAIN = 0xA5, FOCUS = 0xB0,
  ZOOM = 0xB3, ZOOMREQ = 0xB4, IRCUTFILTER = 0xB5, DIGITALZOOM = 0xB7,
  FOOTER = 0xEF, RESPONSE = 0xFE, HEADER = 0xFF
}


Detailed Description

A class with the commands for the VCC4.

This class is for controlling the Canon VC-C4 camera.

This camera has a reponse mechanism, whereby each packet sent to the camera generates an answer within 300ms. For the most part, the answer consists of a 6-byte packet which has an error-status within it. Some commands generate longer packets. Receiving the error status is helpful in that you know that the camera will or will not execute the command. However, it doesn't tell you when the command is completed.

In order for the the reponses to work, the CTS line on the camera must be high. This is pin 2 on the visca port. If your camera is not wired in such a fashion, then no answers will be sent to the computer, and the computer will not know whether or not the last packet was processed correctly. Because of this, systems operating without the answer feature will need to run with delays between sending packets. Otherwise, packets will be ignored, but you will have no way of knowing that. To achieve this, there are two types of communication modes that this class will operate under - COMM_UNIDIRECTIONAL or COMM_BIDIRECTIONAL. The default is COMM_UNKNOWN, in which it will use bidirectional commuication if a response is received.

To handle the states and packet processing, this class runs as a user-task, different than the other pan/tilt devices. Because of this, it must have a valid robot connection and a valid serial connection if using a computer serial port. Note that the computer port must be set independently of this class. The aux port can be selected via setAuxPort from the ArPTZ class.

The camera's pan and tilt commands work on a number of units equal to (degrees / 0.1125). The panTilt function always rounds the conversion closer to zero, so that a magnitude greater than the allowable range of movement is not sent to the camera.

NEW - There is now limited support for the night-mode version of this camera, the C50i. To enable night-mode support, pass the camera type in with the constructor. Night-mode consists of two parts - a phsyical IR-cutoff filter, and IR LEDs. The cutoff filter must be enabled first, then turn on the IR LEDs.

This new camera has a digital zoom as well as the optical one. There is a new function for handling the digital. There is also limited support for the auto-focus mechanism, which may need to be elaborated on for better night-vision. In addition to the focus, there are also gain adjustments that can be made, but are not yet implemented in this class.

Definition at line 75 of file ArVCC4.h.


Member Enumeration Documentation

enum ArVCC4Commands::Command
 

Enumeration values:
DELIM  Delimeter character.
DEVICEID  Default device ID.
PANSLEW  Sets the pan slew.
TILTSLEW  Sets the tilt slew.
STOP  Stops current pan/tilt motion.
INIT  Initializes the camera.
SLEWREQ  Request pan/tilt min/max slew.
ANGLEREQ  Request pan/tilt min/max angle.
PANTILT  Pan/tilt command.
SETRANGE  Pan/tilt min/max range assignment.
PANTILTREQ  Request pan/tilt position.
INFRARED  Controls operation of IR lighting.
PRODUCTNAME  Requests the product name.
LEDCONTROL  Controls LED status.
CONTROL  Puts camera in Control mode.
POWER  Turns on/off power.
AUTOFOCUS  Controls auto-focusing functions.
ZOOMSTOP  Stops zoom motion.
GAIN  Sets gain adjustment on camera.
FOCUS  Manual focus adjustment.
ZOOM  Zooms camera lens.
ZOOMREQ  Requests max zoom position.
IRCUTFILTER  Controls the IR cut filter.
DIGITALZOOM  Controls the digital zoom amount.
FOOTER  Packet Footer.
RESPONSE  Packet header for response.
HEADER  Packet Header.

Definition at line 78 of file ArVCC4.h.


The documentation for this class was generated from the following file:
Generated on Wed Oct 19 12:56:56 2005 for Aria by  doxygen 1.4.0