next up previous contents
Next: 6.23 sonar Up: 6. Device Interfaces Previous: 6.21 power   Contents

Subsections


6.22 ptz

Synopsis

The ptz interface is used to control a pan-tilt-zoom unit.

Constants

#define PLAYER_PTZ_GENERIC_CONFIG_REQ ((uint8_t)1)
#define PLAYER_PTZ_CONTROL_MODE_REQ ((uint8_t)2)
Configuration request codes

#define PLAYER_PTZ_MAX_CONFIG_LEN 32
Maximum command length for use with PLAYER_PTZ_GENERIC_CONFIG_REQ, based on the Sony EVID30 camera right now.

#define PLAYER_PTZ_VELOCITY_CONTROL 0
#define PLAYER_PTZ_POSITION_CONTROL 1
Control modes, for use with PLAYER_PTZ_CONTROL_MODE_REQ

Data



struct player_ptz_data : The ptz interface returns data reflecting the current state of the Pan-Tilt-Zoom unit; the format is:

int16_t pan;
Pan (degrees)

int16_t tilt;
Tilt (degrees)

int16_t zoom;
Field of view (degrees).

int16_t panspeed, tiltspeed;
Current pan/tilt velocities (deg/sec)

Command



struct player_ptz_cmd : The ptz interface accepts commands that set change the state of the unit; the format is given below. Note that the commands are absolute, not relative.

int16_t pan;
Desired pan angle (degrees)

int16_t tilt;
Desired tilt angle (degrees)

int16_t zoom;
Desired field of view (degrees).

int16_t panspeed, tiltspeed;
Desired pan/tilt velocities (deg/sec)

Configuration: Set/Get unit-specific config



struct player_ptz_generic_config : This ioctl allows the client to send a unit-specific command to the unit. Whether data is returned depends on the command that was sent. The server may fill in "config" with a reply if applicable.

uint8_t subtype;
Must be set to PLAYER_PTZ_GENERIC_CONFIG_REQ

uint16_t length;
Length of data in config buffer

uint8_t config[PLAYER_PTZ_MAX_CONFIG_LEN];
Buffer for command/reply

Configuration: Change control mode



struct player_ptz_controlmode_config : This ioctl allows the client to switch between position and velocity control, for those drivers that support it. Note that this request changes how the driver interprets forthcoming commands from all clients.

uint8_t subtype;
Must be set to PLAYER_PTZ_CONTROL_MODE_REQ

uint8_t mode;
Mode to use: must be either PLAYER_PTZ_VELOCITY_CONTROL or PLAYER_PTZ_POSITION_CONTROL.


next up previous contents
Next: 6.23 sonar Up: 6. Device Interfaces Previous: 6.21 power   Contents
2004-06-02