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.

52 lines
1.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __PROTOCOL_PTZ_VISCA_HEADER__
  2. #define __PROTOCOL_PTZ_VISCA_HEADER__
  3. #include "protocolPTZ.h"
  4. class protocolPTZ_VISCA : public protocolPTZ
  5. {
  6. private:
  7. basicLogCollection * m_pLog;
  8. U8 m_aSlots[16];
  9. // U8 m_bLANC_ID;
  10. basicMutex m_mInquiryMutex;
  11. config_setting_t * m_pSettings;
  12. /* Internal Methods */
  13. bool sendIfClear(void);
  14. bool setPowerSaveMode(bool nMode);
  15. bool getPowerSaveMode(void);
  16. bool startZoomWide(void);
  17. bool startZoomTele(void);
  18. bool startZoomWide(double nSpeed);
  19. bool startZoomTele(double nSpeed);
  20. bool stopZoom(void);
  21. bool resetPTZDrive(void);
  22. bool goHomePosition(void);
  23. protected:
  24. protocolPackage * packetExtractor(unsigned char * Buffer, size_t BufferSize);
  25. int packetChecker(U8 * Buffer, size_t BufferSize);
  26. // bool packetHandler( unsigned char *Buffer, size_t BufferSize );
  27. bool packetHandler(protocolPackage * Package);
  28. public:
  29. explicit protocolPTZ_VISCA(config_setting_t * Settings = NULL);
  30. explicit protocolPTZ_VISCA(uint8_t CAM_ID);
  31. virtual ~protocolPTZ_VISCA();
  32. /* Implemen Generic PTZ Interface */
  33. virtual bool create(void);
  34. virtual bool initCamera(void);
  35. virtual bool setAutoFocus(bool nMode);
  36. virtual bool setZoom(double nZoom);
  37. virtual double getZoom(void);
  38. virtual bool move(uint32_t MoveMatrix);
  39. virtual bool goAbsolute(float dPan, float dTilt, float dZoom);
  40. virtual bool setOSD(bool nMode);
  41. };
  42. #endif