24 #ifndef P2OS_DRIVER__P2OS_PTZ_HPP_ 25 #define P2OS_DRIVER__P2OS_PTZ_HPP_ 27 #include <p2os_msgs/PTZState.h> 116 MAX_ZOOM_OPTIC = 1960,
123 CAM_ERROR_NONE = 0x30,
124 CAM_ERROR_BUSY = 0x31,
125 CAM_ERROR_PARAM = 0x35,
126 CAM_ERROR_MODE = 0x39,
127 CAM_ERROR_UNKNOWN = 0xFF
144 void callback(
const p2os_msgs::PTZStateConstPtr & msg);
147 int sendCommand(
unsigned char * str,
int len);
148 int sendRequest(
unsigned char * str,
int len,
unsigned char * reply);
149 int receiveCommandAnswer(
int asize);
150 int receiveRequestAnswer(
unsigned char * data,
int s1,
int s2);
151 void getPtzPacket(
int s1,
int s2 = 0);
154 int setPower(
Power on);
155 int setControlMode();
158 int getMaxZoom(
int * max_zoom);
159 int getAbsZoom(
int * zoom);
160 int sendAbsZoom(
int zoom);
162 int setDefaultTiltRange();
163 int getAbsPanTilt(
int * pan,
int * tilt);
164 int sendAbsPanTilt(
int pan,
int tilt);
167 bool isOn()
const {
return is_on_;}
197 #endif // P2OS_DRIVER__P2OS_PTZ_HPP_
static const int MAX_COMMAND_LENGTH
p2os_msgs::PTZState getCurrentState()
static const int PACKET_TIMEOUT
void putOnBuf(unsigned char c)
static const int TILT_THRESH
static const int SLEEP_TIME_USEC
static const int COMMAND_RESPONSE_BYTES
static const int PAN_THRESH
static const int MAX_REQUEST_LENGTH
static const int ZOOM_THRESH
p2os_msgs::PTZState current_state_