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.

64 lines
1.6 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: RELAY.H
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of RELAY.H
  13. //----------------------------------------------------------------------------
  14. #ifndef __RELAY__H__INCLUDED__
  15. #define __RELAY__H__INCLUDED__
  16. #include "..\lgs\stdafx.h"
  17. #include "..\lglib\device\lgdevptz.h"
  18. #include "..\lglib\comm\lgsm.h"
  19. #ifdef INCLUDE_WINDOWS_DEFINITIONS
  20. #include "..\lgs\Isr.h"
  21. #include "..\lgs\Stream.h"
  22. #include "..\lgs\Board.h"
  23. #else
  24. #include "..\EmulateLGS\EmulateHW.h"
  25. #endif
  26. class CRelay
  27. {
  28. public:
  29. CRelay();
  30. virtual ~CRelay();
  31. public:
  32. virtual BOOL Create( CBoard *pBoard, LGS::PRELAY_PARAMETERS pParameters );
  33. virtual void Invalidate( WORD nFastTimer, DWORD nSlowTimer );
  34. virtual void Destroy();
  35. public:
  36. // protocol processing
  37. void OnProtocolLgsRelayCommand( PBYTE pReadBuffer, INT& nReadCount, PBYTE pSendBuffer, INT& nSendCount );
  38. // tagget processing
  39. void OnTarget( INT nAngle, INT nRange );
  40. // settings
  41. LGS::RELAY_PARAMETERS& GetParameters() { return m_RelayParameters; }
  42. void SetParameters( LGS::PRELAY_PARAMETERS pParameters ) { m_RelayParameters = *pParameters; }
  43. private:
  44. void SetRelay( BOOL bOn );
  45. private:
  46. DWORD m_dwAutoDelayTime;
  47. LONG m_lAutoDelayTimeout;
  48. private:
  49. CBoard *m_pBoard;
  50. BYTE m_bOutput;
  51. private:
  52. LGS::RELAY_PARAMETERS m_RelayParameters;
  53. };
  54. #endif