|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcanonVC_C50i.CanonVC
public class CanonVC
Field Summary | |
---|---|
(package private) static byte[] |
camResponse
|
(package private) byte[] |
curComand
|
(package private) java.lang.String |
defaultPort
|
(package private) int |
focusMaxRange
|
(package private) int |
focusMinRange
|
(package private) double |
focusPosition
|
(package private) static java.io.InputStream |
inputStream
|
(package private) static int |
MAX_OPERATION_TIME
|
(package private) boolean |
outputBufferEmptyFlag
|
(package private) static java.io.OutputStream |
outputStream
|
(package private) int |
panDirection
|
(package private) static double |
panMax
|
(package private) double |
panMaxSpeed
|
(package private) double |
panMinSpeed
|
(package private) double |
panRatio
|
(package private) double |
panSpeed
|
(package private) javax.comm.CommPortIdentifier |
portId
|
(package private) java.util.Enumeration |
portList
|
(package private) java.lang.Thread |
readThread
|
(package private) javax.comm.SerialPort |
serialPort
|
(package private) static byte[] |
tempResponse
|
(package private) int |
tiltDirection
|
(package private) static double |
tiltMax
|
(package private) double |
tiltMaxSpeed
|
(package private) double |
tiltMinSpeed
|
(package private) double |
tiltRatio
|
(package private) double |
tiltSpeed
|
(package private) static byte |
VC_CMD_END
|
(package private) double |
xPosition
|
(package private) double |
yPosition
|
(package private) int |
zoomMaxRange
|
(package private) int |
zoomMinRange
|
(package private) double |
zoomPosition
|
Constructor Summary | |
---|---|
CanonVC()
|
|
CanonVC(java.lang.String port)
|
Method Summary | |
---|---|
static byte[] |
angle2ascii(double pan,
int size)
|
static void |
AngleAssignment(double x,
double y)
|
void |
close()
|
static int |
CommandtoCam(byte[] command)
Send a message to the camera. |
(package private) static long |
getTime()
|
void |
InitializePedestal()
|
void |
run()
|
void |
serialEvent(javax.comm.SerialPortEvent event)
whenever there is a response from the camera read into tempResponse |
(package private) static canonVC_C50i.VCstatus |
VCcameraStatus()
Given a response from the camera, decide whether it is a good one or not. |
(package private) double |
VCconvertPanSpeed(double ps)
Convert the pan speed to the actual pan speed that the camera will use. |
(package private) double |
VCconvertTiltSpeed(double ts)
Convert the tilt speed to the actual tilt speed that the camera will use. |
(package private) void |
VCgetFocusPosition()
Get the current focus position. |
(package private) void |
VCgetFocusRange()
Get the focal range. |
(package private) void |
VCgetPanRatio()
Get the pan ratio of the camera. |
(package private) void |
VCgetPanSpeed()
Get the pan speed of the camera in degrees / sec. |
(package private) void |
VCgetPosition()
Get the current pan and tilt angles of the camera. |
(package private) void |
VCgetTiltRatio()
Get the tilt ratio of the camera. |
(package private) void |
VCgetTiltSpeed()
Get the tilt speed of the camera in degrees / sec. |
(package private) void |
VCgetZoomPosition()
Get the current zoom position. |
(package private) void |
VCgetZoomRange()
Get the zoom range. |
(package private) byte[] |
VChexToAscii(short h,
byte[] ascii,
int size)
Convert up to four nibbles of an short to ascii. |
(package private) void |
VChome()
Point the camera to the straight ahead position. |
(package private) void |
VChostControl()
Put the camera in host control mode. |
(package private) short |
VCpanDegreesToAscii(double degrees,
byte[] ascii,
int start,
int size)
Convert pan degrees to raw camera native units. |
(package private) static void |
VCprintCommand(byte[] BUF)
Print the current command. |
(package private) double |
VCrawToInt(byte[] raw,
int start,
int size)
Given an ascii string of hex numbers, convert it to a binary. |
(package private) double |
VCrawToReal(byte[] raw,
int start,
int size)
Given an ascii string of hex numbers, convert it to a real number. |
(package private) void |
VCreset()
Reset the camera. |
(package private) void |
VCsetFocusMode(int mode)
Set the focus mode. |
(package private) void |
VCsetFocusPosition(int pos)
Set the focus position. |
(package private) void |
VCsetPanSpeed(double ps)
Set the pan speed of the camera. |
(package private) void |
VCsetTiltSpeed(double ts)
Set the tilt speed of the camera. |
(package private) void |
VCsetZoom(int zoom)
Set the zoom. |
(package private) short |
VCtiltDegreesToAscii(double degrees,
byte[] ascii,
int start,
int size)
Convert tilt degrees to raw camera native units. |
(package private) static int |
VCtoCameraRetryBusy(byte[] command)
Send a command to the camera. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.lang.Thread readThread
java.util.Enumeration portList
javax.comm.CommPortIdentifier portId
javax.comm.SerialPort serialPort
static java.io.OutputStream outputStream
boolean outputBufferEmptyFlag
static java.io.InputStream inputStream
java.lang.String defaultPort
static final int MAX_OPERATION_TIME
static byte[] camResponse
byte[] curComand
static byte[] tempResponse
static double panMax
static double tiltMax
double panMinSpeed
double panMaxSpeed
double tiltMinSpeed
double tiltMaxSpeed
double tiltSpeed
double panSpeed
double xPosition
double yPosition
double zoomPosition
double focusPosition
double panRatio
double tiltRatio
int focusMinRange
int focusMaxRange
int zoomMinRange
int zoomMaxRange
int panDirection
int tiltDirection
static final byte VC_CMD_END
Constructor Detail |
---|
CanonVC()
CanonVC(java.lang.String port)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
static long getTime()
public void serialEvent(javax.comm.SerialPortEvent event)
serialEvent
in interface javax.comm.SerialPortEventListener
event
-
double VCrawToInt(byte[] raw, int start, int size)
raw
- Ascii string of hex numberssize
- Number of characters in raw.
double VCrawToReal(byte[] raw, int start, int size)
raw
- Ascii string of hex numberssize
- Number of characters in raw.
byte[] VChexToAscii(short h, byte[] ascii, int size)
h
- Integer value.size
- Number of bytes in resulting ascii.
static void VCprintCommand(byte[] BUF)
vc
- Control structure.short VCpanDegreesToAscii(double degrees, byte[] ascii, int start, int size)
degrees
- Degrees to pan (-360 to +360).ascii
- Put 4 ascii characters here.size
- Number of bytes in resulting ascii.
short VCtiltDegreesToAscii(double degrees, byte[] ascii, int start, int size)
degrees
- Degrees to tilt (-360 to +360).ascii
- Put 4 ascii characters here.size
- Number of bytes in resulting ascii.
static canonVC_C50i.VCstatus VCcameraStatus()
vc
- Control structure.response
- Message from camera to computer.
public static int CommandtoCam(byte[] command) throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.command
- Command bytes to send to the camera,
terminated with VC_CMD_END.resp
- If this is not null and the camera gives a
good response, then put the resonse here. Caller must
ensure that the buffer is big enough.
canonVC_C50i.CanonVC_Exception
static int VCtoCameraRetryBusy(byte[] command) throws canonVC_C50i.CanonVC_Exception
command
- Command to send to camera.
canonVC_C50i.CanonVC_Exception
public static byte[] angle2ascii(double pan, int size)
public static void AngleAssignment(double x, double y)
void VChostControl() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.
canonVC_C50i.CanonVC_Exception
void VCgetPosition() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.
canonVC_C50i.CanonVC_Exception
void VCgetPanRatio() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.ps
- Pan ratio (returned).
canonVC_C50i.CanonVC_Exception
void VCgetTiltRatio() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.ps
- Tilt ratio (returned).
canonVC_C50i.CanonVC_Exception
void VCsetPanSpeed(double ps) throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.ps
- Pan speed in degrees/sec.
canonVC_C50i.CanonVC_Exception
void VCsetTiltSpeed(double ts) throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.ts
- Tilt speed in degrees/sec.
canonVC_C50i.CanonVC_Exception
void VCgetPanSpeed() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.
canonVC_C50i.CanonVC_Exception
void VCgetTiltSpeed() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.ps
- Tilt speed (returned).
canonVC_C50i.CanonVC_Exception
double VCconvertPanSpeed(double ps)
vc
- Control structure.ps
- Pan speed.
double VCconvertTiltSpeed(double ts)
vc
- Control structure.ts
- Tilt speed.
void VCreset() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.
canonVC_C50i.CanonVC_Exception
void VCsetFocusMode(int mode) throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.mode
- Focus mode.
canonVC_C50i.CanonVC_Exception
void VCsetFocusPosition(int pos) throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.pos
- Position of focus.
canonVC_C50i.CanonVC_Exception
void VCgetFocusRange() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.minFocus
- Minimum focus range.maxFocus
- Maximum focus range.
canonVC_C50i.CanonVC_Exception
void VCgetFocusPosition() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.pos
- Focus position (returned).
canonVC_C50i.CanonVC_Exception
void VCgetZoomRange() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.minFocus
- Minimum focus range.maxFocus
- Maximum focus range.
canonVC_C50i.CanonVC_Exception
void VCsetZoom(int zoom) throws canonVC_C50i.CanonVC_Exception
zoom
- Amount to zoom. The larger the value, the
more the image is magnified.
canonVC_C50i.CanonVC_Exception
void VCgetZoomPosition() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.pos
- Zoom position (returned).
canonVC_C50i.CanonVC_Exception
void VChome() throws canonVC_C50i.CanonVC_Exception
vc
- Control structure.
canonVC_C50i.CanonVC_Exception
public void close()
public void InitializePedestal() throws canonVC_C50i.CanonVC_Exception
canonVC_C50i.CanonVC_Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |