|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.PtzInterface
public class PtzInterface
The ptz interface is used to control a pan-tilt-zoom unit, such as a camera.
Field Summary | |
---|---|
protected short |
PLAYER_PTZ_AUTOSERVO
|
protected short |
PLAYER_PTZ_CONTROL_MODE_REQ
|
protected short |
PLAYER_PTZ_GENERIC_CONFIG_REQ
|
short |
PLAYER_PTZ_MAX_CONFIG_LEN
maximum command length for use with PLAYER_PTZ_GENERIC_CONFIG_REQ, based on the Sony EVID30 camera right now |
Fields inherited from class javaclient.PlayerDevice |
---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
Constructor Summary | |
---|---|
PtzInterface(PlayerClient pc,
short indexOfDevice)
Constructor for PtzInterface. |
Method Summary | |
---|---|
void |
controlRequest(int mode)
Configuration request: Control mode. |
void |
genericRequest(int length,
byte[] buf)
Configuration request: Generic request. |
short |
getPan()
Get pan in degrees. |
short |
getPanSpeed()
Get current pan velocity in deg/sec. |
short |
getTilt()
Get tilt in degrees. |
short |
getTiltSpeed()
Get current tilt velocity in deg/sec. |
short |
getZoom()
Get field of view in degrees. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
void |
readData()
Read the data reflecting the current state of the Pan-Tilt-Zoom unit. |
void |
setAutoServo(int mode)
Configuration request: Set AutoServo mode. |
void |
setPTZ(int pan,
int tilt,
int zoom,
int panspeed,
int tiltspeed)
The ptz interface accepts commands that set change the state of the unit. |
Methods inherited from class javaclient.PlayerDevice |
---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, readHeader, sendHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final short PLAYER_PTZ_MAX_CONFIG_LEN
protected final short PLAYER_PTZ_GENERIC_CONFIG_REQ
protected final short PLAYER_PTZ_CONTROL_MODE_REQ
protected final short PLAYER_PTZ_AUTOSERVO
Constructor Detail |
---|
public PtzInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public void setPTZ(int pan, int tilt, int zoom, int panspeed, int tiltspeed)
pan
- pan (degrees): -100..100tilt
- tilt (degrees): -25..25zoom
- field of view (degrees): 0..1023panspeed
- current pan velocity (deg/sec)tiltspeed
- current tilt velocity (deg/sec)public void genericRequest(int length, byte[] buf)
length
- length of data in config bufferbuf
- buffer for command/replypublic void controlRequest(int mode)
mode
- mode to use: must be either PLAYER_PTZ_VELOCITY_CONTROL (0) or
PLAYER_PTZ_POSITION_CONTROL (1)public void setAutoServo(int mode)
mode
- 0=disabled, 1=enabledpublic short getPan()
public short getTilt()
public short getZoom()
public short getPanSpeed()
public short getTiltSpeed()
public void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payload
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |