#include <p2os_ptz.h>
|
enum | CameraType { CAMERA_VCC4,
CAMERA_C50I
} |
|
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
} |
|
enum | CommState { COMM_UNKNOWN,
COMM_BIDIRECTIONAL,
COMM_UNIDIRECTIONAL
} |
|
|
enum | Error {
CAM_ERROR_NONE = 0x30,
CAM_ERROR_BUSY = 0x31,
CAM_ERROR_PARAM = 0x35,
CAM_ERROR_MODE = 0x39,
CAM_ERROR_UNKNOWN = 0xFF
} |
|
enum | Param {
MAX_PAN = 98,
MIN_PAN = -98,
MAX_TILT = 88,
MIN_TILT = -30,
MAX_PAN_SLEW = 90,
MIN_PAN_SLEW = 1,
MAX_TILT_SLEW = 69,
MIN_TILT_SLEW = 1,
MAX_ZOOM_OPTIC = 1960,
MIN_ZOOM = 0
} |
|
enum | Power { POWER_OFF = 0,
POWER_ON = 1
} |
|
Definition at line 56 of file p2os_ptz.h.
Enumerator |
---|
CAMERA_VCC4 |
|
CAMERA_C50I |
|
Definition at line 96 of file p2os_ptz.h.
Enumerator |
---|
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 59 of file p2os_ptz.h.
Enumerator |
---|
COMM_UNKNOWN |
|
COMM_BIDIRECTIONAL |
|
COMM_UNIDIRECTIONAL |
|
Definition at line 90 of file p2os_ptz.h.
Enumerator |
---|
CAM_ERROR_NONE |
No error.
|
CAM_ERROR_BUSY |
Camera busy, will not execute the command.
|
CAM_ERROR_PARAM |
Illegal parameters to function call.
|
CAM_ERROR_MODE |
Not in host control mode.
|
CAM_ERROR_UNKNOWN |
Unknown error condition. Should never happen.
|
Definition at line 117 of file p2os_ptz.h.
Enumerator |
---|
MAX_PAN |
|
MIN_PAN |
|
MAX_TILT |
|
MIN_TILT |
|
MAX_PAN_SLEW |
|
MIN_PAN_SLEW |
|
MAX_TILT_SLEW |
|
MIN_TILT_SLEW |
|
MAX_ZOOM_OPTIC |
|
MIN_ZOOM |
|
Definition at line 103 of file p2os_ptz.h.
Enumerator |
---|
POWER_OFF |
|
POWER_ON |
|
Definition at line 126 of file p2os_ptz.h.
P2OSPtz::P2OSPtz |
( |
P2OSNode * |
p2os, |
|
|
bool |
bidirectional_com = false |
|
) |
| |
void P2OSPtz::callback |
( |
const p2os_msgs::PTZStateConstPtr & |
msg | ) |
|
int P2OSPtz::getAbsPanTilt |
( |
int * |
pan, |
|
|
int * |
tilt |
|
) |
| |
int P2OSPtz::getAbsZoom |
( |
int * |
zoom | ) |
|
p2os_msgs::PTZState P2OSPtz::getCurrentState |
( |
| ) |
|
|
inline |
int P2OSPtz::getMaxZoom |
( |
int * |
max_zoom | ) |
|
void P2OSPtz::getPtzPacket |
( |
int |
s1, |
|
|
int |
s2 = 0 |
|
) |
| |
bool P2OSPtz::isOn |
( |
| ) |
const |
|
inline |
int P2OSPtz::receiveCommandAnswer |
( |
int |
asize | ) |
|
int P2OSPtz::receiveRequestAnswer |
( |
unsigned char * |
data, |
|
|
int |
s1, |
|
|
int |
s2 |
|
) |
| |
int P2OSPtz::sendAbsPanTilt |
( |
int |
pan, |
|
|
int |
tilt |
|
) |
| |
int P2OSPtz::sendAbsZoom |
( |
int |
zoom | ) |
|
int P2OSPtz::sendCommand |
( |
unsigned char * |
str, |
|
|
int |
len |
|
) |
| |
int P2OSPtz::sendInit |
( |
| ) |
|
int P2OSPtz::sendRequest |
( |
unsigned char * |
str, |
|
|
int |
len, |
|
|
unsigned char * |
reply |
|
) |
| |
int P2OSPtz::setControlMode |
( |
| ) |
|
int P2OSPtz::setDefaultTiltRange |
( |
| ) |
|
int P2OSPtz::setPower |
( |
Power |
on | ) |
|
void P2OSPtz::shutdown |
( |
| ) |
|
bool P2OSPtz::bidirectional_com_ |
|
protected |
const int P2OSPtz::COMMAND_RESPONSE_BYTES = 6 |
|
staticprotected |
p2os_msgs::PTZState P2OSPtz::current_state_ |
|
protected |
const int P2OSPtz::MAX_COMMAND_LENGTH = 19 |
|
staticprotected |
const int P2OSPtz::MAX_REQUEST_LENGTH = 17 |
|
staticprotected |
const int P2OSPtz::PACKET_TIMEOUT = 300 |
|
staticprotected |
const int P2OSPtz::PAN_THRESH = 1 |
|
staticprotected |
const int P2OSPtz::SLEEP_TIME_USEC = 300000 |
|
staticprotected |
const int P2OSPtz::TILT_THRESH = 1 |
|
staticprotected |
const int P2OSPtz::ZOOM_THRESH = 1 |
|
staticprotected |
The documentation for this class was generated from the following files: