You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __PROTOCOL_PTZ_PELCO_HEADER__
  2. #define __PROTOCOL_PTZ_PELCO_HEADER__
  3. #include "protocolPTZ.h"
  4. #define SYNC_IDX 0
  5. #define ADR_IDX 1
  6. #define DCMD1_IDX 2
  7. #define DCMD2_IDX 3
  8. #define DATA1_IDX 4
  9. #define DATA2_IDX 5
  10. #define CHKSUM_IDX 6
  11. #define RESP_ACK 0x01
  12. #define RESP_NAK 0x00
  13. class protocolPTZ_PELCO: public protocolPTZ{
  14. private:
  15. U8 m_bCAM_ID;
  16. basicMutex m_mInquiryMutex;
  17. U8 finishUpPackage(U8 *pBuffer);
  18. protected:
  19. protocolPackage *packetExtractor( unsigned char *Buffer, size_t BufferSize );
  20. int packetChecker( U8 *Buffer, size_t BufferSize );
  21. bool packetHandler( protocolPackage *Package );
  22. public:
  23. explicit protocolPTZ_PELCO(config_setting_t *Settings = NULL);
  24. virtual ~protocolPTZ_PELCO();
  25. virtual bool create( void );
  26. virtual bool initCamera( void );
  27. virtual bool setPowerSaveMode( bool nMode );
  28. virtual bool setAutoFocus( bool nMode );
  29. virtual bool getPowerSaveMode( void );
  30. virtual bool startZoomWide( void );
  31. virtual bool startZoomTele( void );
  32. virtual bool startZoomWide( double nSpeed );
  33. virtual bool startZoomTele( double nSpeed );
  34. virtual bool stopZoom( void );
  35. virtual bool setPanPos( double dPan );
  36. virtual bool setTiltPos( double dTilt );
  37. virtual bool setZoom( double dZoom );
  38. virtual bool resetPTZDrive( void );
  39. virtual bool goHomePosition( void );
  40. virtual bool move(uint32_t MoveMatrix);
  41. virtual bool setOSD( bool nMode );
  42. };
  43. #endif