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.

56 lines
1.3 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: SocketLGS.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of SocketLGS.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __SOCKET__SINGLE__LGS__H__INCLUDED__
  15. #define __SOCKET__SINGLE__LGS__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\..\LgLib\Comm\RS485.h"
  20. #include "Socket.h"
  21. #include "..\..\LgLib\Thread.h"
  22. #include "EventQueue.h"
  23. class CSocketLGS :
  24. public CSocket,
  25. public CLgThread
  26. {
  27. public:
  28. CSocketLGS();
  29. virtual ~CSocketLGS();
  30. public:
  31. BOOL Create( CSensorArray* pSensorArray, LPCTSTR pPort );
  32. BOOL DeviceAttach(CDeviceLGSs *pDevice);
  33. BOOL DeviceDetach();
  34. public:
  35. virtual void CommandLoopStart();
  36. virtual void CommandLoopStop();
  37. private:
  38. virtual DWORD ThreadProc();
  39. virtual BOOL Stop( BOOL bWaitForComplete );
  40. private:
  41. BYTE m_pBuffer[10];
  42. DWORD m_nCount;
  43. BOOL m_bRunning;
  44. HANDLE m_hEvent;
  45. CDeviceLGSs *m_pDevice;
  46. CConnectionRS485 m_Connection;
  47. };
  48. #endif