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.

75 lines
2.7 KiB

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: DeviceMigvanPTZ.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of DeviceMigvanPTZ.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __DEVICE__MIGVAN__PTZ__H__INCLUDED__
  15. #define __DEVICE__MIGVAN__PTZ__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "Device.h"
  20. #include "DevicePTZ.h"
  21. #include "SocketMigvanPTZ.h"
  22. #include "..\..\LgLib\Net\LgNetDeviceMigvanPTZ.h"
  23. class CDeviceMigvanPTZ :
  24. public CDevice,
  25. public CDevicePTZ,
  26. public CLgNetDeviceMigvanPTZ
  27. {
  28. public:
  29. CDeviceMigvanPTZ();
  30. virtual ~CDeviceMigvanPTZ();
  31. public:
  32. void InitDevice() { PTZ_PostInit(); }
  33. public:
  34. void SetHardwareID( LPBYTE pID ) { ::CopyMemory( m_pHardwareID, pID, sizeof(BYTE) * 5 ); }
  35. void SetHardwareID( BYTE id0, BYTE id1, BYTE id2, BYTE id3, BYTE id4 ) { m_pHardwareID[0] = id0; m_pHardwareID[1] = id1; m_pHardwareID[2] = id2; m_pHardwareID[3] = id3; m_pHardwareID[4] = id4; }
  36. public:
  37. void SetAutoInit( BOOL bAutoInit ) { m_bAutoInit = bAutoInit; }
  38. protected:
  39. virtual void SetAddress( INT nAddress )
  40. {
  41. CLgNetDeviceMigvanPTZ::SetAddress( nAddress );
  42. PTZ_PostInit();
  43. }
  44. protected:
  45. virtual void PTZ_PostInit() { CDevicePTZ::PTZ_PostInit(); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  46. virtual void PTZ_PostReset() { CDevicePTZ::PTZ_PostReset(); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  47. virtual void PTZ_PostSetPTZ( double pan, double tilt, double zoom ) { CDevicePTZ::PTZ_PostSetPTZ( pan, tilt, zoom ); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  48. virtual void PTZ_PostGetPTZ() { CDevicePTZ::PTZ_PostGetPTZ(); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  49. virtual void PTZ_PostPan( double speed, int nDir ) { CDevicePTZ::PTZ_PostPan( speed, nDir ); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  50. virtual void PTZ_PostTilt( double speed, int nDir ) { CDevicePTZ::PTZ_PostTilt( speed, nDir ); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  51. virtual void PTZ_PostZoom( double speed, int nDir ) { CDevicePTZ::PTZ_PostZoom( speed, nDir ); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  52. virtual void PTZ_PostIris( double value ) { CDevicePTZ::PTZ_PostIris( value ); ((CSocketMigvanPTZ*)m_pSocket)->Resume(); }
  53. virtual void PTZ_PostWiper( BOOL bOn ) { CDevicePTZ::SetReady(); }
  54. protected:
  55. virtual BOOL DeviceProc( CLgNetSocket *pSocket, CProtocol *pProtocol );
  56. private:
  57. BOOL m_bEnable;
  58. CLgNetObject m_MessageDispatcher;
  59. private:
  60. BYTE m_pHardwareID[5];
  61. BOOL m_bAutoInit;
  62. };
  63. #endif