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.

94 lines
2.0 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: DPelco.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of DPelco.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __PTZ__DEVICE__PELCO__H__INCLUDED__
  15. #define __PTZ__DEVICE__PELCO__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #ifdef __BORLANDC__
  20. #include "..\LgLib\Device\LgDevPTZ.h"
  21. #include "..\LgLib\Comm\PTZPelco.h"
  22. #else
  23. #include "LgDevPTZ.h"
  24. #include "..\Comm\PTZPelco.h"
  25. #endif
  26. class CLgDevicePTZPelco : public CLgDevicePTZ
  27. {
  28. public:
  29. CLgDevicePTZPelco();
  30. virtual ~CLgDevicePTZPelco();
  31. public:
  32. virtual BOOL WriteProc( void *pProtocol, PLONG pTimeout );
  33. virtual BOOL ReadProc( void *pProtocol, LONG lTimeout, BOOL bLastChance );
  34. public:
  35. BOOL CmdInit();
  36. protected:
  37. virtual void OnEvtInit() = 0;
  38. private:
  39. enum
  40. {
  41. STAGE_INIT_TURN_ON,
  42. STAGE_INIT_AUTO_FOCUS,
  43. STAGE_INIT_AUTO_IRIS,
  44. STAGE_INIT_AUTO_GAIN_CONTROL,
  45. STAGE_INIT_BACKLIGHT_COMPENSATION,
  46. STAGE_INIT_WHITE_BALANCE,
  47. STAGE_SET_PAN_POSITION,
  48. STAGE_SET_TILT_POSITION,
  49. STAGE_SET_ZOOM_POSITION,
  50. STAGE_GET_PAN_POSITION,
  51. STAGE_GET_TILT_POSITION,
  52. STAGE_GET_ZOOM_POSITION,
  53. STAGE_SET_IRIS,
  54. };
  55. BOOL LoadUserSettings( void );
  56. int PELCO_MAX_NO_REPLY_COUNT;
  57. int PELCO_MAX_OPTICAL_ZOOM;
  58. int PELCO_DELAY_BEFORE_GET_POSITION;
  59. int PELCO_PAN_REVERSE;
  60. public:
  61. enum
  62. {
  63. CMD_INIT = CMD_DEVICE_PTZ + 1,
  64. EVT_INIT = EVT_DEVICE_PTZ + 1,
  65. };
  66. private:
  67. INT m_nMode;
  68. INT m_nStage;
  69. INT m_nNoReplyCount;
  70. INT m_nNotInPositionCount;
  71. BOOL m_bPause;
  72. private:
  73. PTZ_POSITION m_TempPosition;
  74. PTZ_PELCO::PTZ_STATE m_PtzState;
  75. INT m_nResponseSize;
  76. private:
  77. void OnPerformCmd();
  78. };
  79. #endif