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.

50 lines
1.1 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 19/04/2000
  5. // Last modification: 08/10/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Fence
  8. // FILE: Fence.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CFence
  13. //----------------------------------------------------------------------------
  14. #ifndef __FENCE__H__INCLUDED__
  15. #define __FENCE__H__INCLUDED__
  16. class CApplication;
  17. class CFence {
  18. public:
  19. CFence();
  20. ~CFence();
  21. public:
  22. BOOL Create(CApplication *pApplication, LPCTSTR pCommPort);
  23. void Enable(BOOL fEnable);
  24. private:
  25. friend DWORD CALLBACK ThreadProcFence(LPVOID lpvParam);
  26. // { return ((CFence*)lpvParam)->ThreadProc(); }
  27. DWORD ThreadProc();
  28. CApplication* m_pApplication;
  29. private:
  30. HANDLE m_hCommPort;
  31. HANDLE m_hThread;
  32. HANDLE m_hEventClose;
  33. BOOL m_bEnable;
  34. };
  35. inline
  36. void CFence::Enable(BOOL fEnable)
  37. {
  38. m_bEnable = fEnable;
  39. }
  40. #endif