Old fashion design for PC-104
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.

88 lines
2.0 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __LG__DEVICE__DOPLER__H__INCLUDED__
  2. #define __LG__DEVICE__DOPLER__H__INCLUDED__
  3. #pragma once
  4. #ifdef __BORLANDC__
  5. #include "..\LgLib\Device\LgDevPTZ.h"
  6. #else
  7. #include "LgDevPTZ.h"
  8. #endif
  9. class CLgDeviceDopler : public CLgDevicePTZ
  10. {
  11. public:
  12. CLgDeviceDopler();
  13. virtual ~CLgDeviceDopler();
  14. public:
  15. enum { MAX_DOPLER_MASK = 8 };
  16. public:
  17. #pragma pack(1)
  18. typedef struct DOPLER
  19. {
  20. BOOL bEnable;
  21. PTZ_DEGREE dPanStep;
  22. DWORD dwTimeout;
  23. }DOPLER, *PDOPLER;
  24. typedef struct DOPLER_ALARM
  25. {
  26. BOOL bAlarm;
  27. PTZ_DEGREE dPan;
  28. }DOPLER_ALARM, *PDOPLER_ALARM;
  29. typedef struct DOPLER_MASK
  30. {
  31. SHORT nStartAngle;
  32. SHORT nStopAngle;
  33. }DOPLER_MASK, *PDOPLER_MASK;
  34. typedef struct DOPLER_MASK_ARRAY
  35. {
  36. BYTE bEnable;
  37. BYTE nCount;
  38. DOPLER_MASK pMask[MAX_DOPLER_MASK];
  39. }DOPLER_MASK_ARRAY, *PDOPLER_MASK_ARRAY;
  40. #pragma pack()
  41. public:
  42. BOOL CmdSetDopler( BOOL bEnable, PTZ_DEGREE dPanStep, DWORD dwTimeout );
  43. BOOL CmdGetDopler();
  44. BOOL CmdSetDoplerMask( PDOPLER_MASK_ARRAY pMask );
  45. BOOL CmdGetDoplerMask();
  46. protected:
  47. virtual void OnEvtSetDopler( BOOL bEnable, PTZ_DEGREE dPanStep, DWORD dwTimeout ) = 0;
  48. virtual void OnEvtGetDopler( BOOL bEnable, PTZ_DEGREE dPanStep, DWORD dwTimeout ) = 0;
  49. virtual void OnEvtSetDoplerMask( PDOPLER_MASK_ARRAY pMask ) = 0;
  50. virtual void OnEvtGetDoplerMask( PDOPLER_MASK_ARRAY pMask ) = 0;
  51. virtual void OnEvtDoplerAlarm( BOOL bAlarm, PTZ_DEGREE dPan ) = 0;
  52. public:
  53. enum
  54. {
  55. CMD_SET_DOPLER = CMD_DEVICE_PTZ + 1,
  56. CMD_GET_DOPLER = CMD_DEVICE_PTZ + 2,
  57. CMD_SET_DOPLER_MASK = CMD_DEVICE_PTZ + 3,
  58. CMD_GET_DOPLER_MASK = CMD_DEVICE_PTZ + 4,
  59. CMD_DEVICE_DOPLER = CMD_DEVICE_PTZ + 5,
  60. EVT_SET_DOPLER = EVT_DEVICE_PTZ + 1,
  61. EVT_GET_DOPLER = EVT_DEVICE_PTZ + 2,
  62. EVT_SET_DOPLER_MASK = CMD_DEVICE_PTZ + 3,
  63. EVT_GET_DOPLER_MASK = CMD_DEVICE_PTZ + 4,
  64. EVT_DOPLER_ALARM = EVT_DEVICE_PTZ + 5,
  65. EVT_DEVICE_DOPLER = EVT_DEVICE_PTZ + 6,
  66. };
  67. protected:
  68. DOPLER m_Dopler;
  69. DOPLER_MASK_ARRAY m_Mask;
  70. };
  71. #endif