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.

57 lines
1.4 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: SocketCCC.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of SocketCCC.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __SOCKET__CCC__H__INCLUDED__
  15. #define __SOCKET__CCC__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\..\LgLib\LgLink.h"
  20. #include "..\..\LgLib\Thread.h"
  21. #include "..\..\LgLib\Comm\RS232.h"
  22. #include "..\..\LgLib\Comm\ProtocolCCC.h"
  23. #include "..\..\LgLib\Net\LgNetSocketCCC.h"
  24. #include "Socket.h"
  25. class CSensor;
  26. class CSocketCCC :
  27. public CSocket,
  28. private CLgNetSocketCCC
  29. {
  30. public:
  31. CSocketCCC();
  32. virtual ~CSocketCCC();
  33. public:
  34. BOOL Create( CSensorArray* pSensorArray, LPCTSTR pPort );
  35. public:
  36. virtual BOOL OnTransactionCCC( PBYTE pReadBuffer, PBYTE pWriteBuffer );
  37. private:
  38. virtual void CommandLoopStart();
  39. virtual void CommandLoopStop();
  40. protected:
  41. virtual __int64 GetFailure() { return CLgNetSocketCCC::GetFailureCount().QuadPart; }
  42. virtual __int64 GetSuccess() { return CLgNetSocketCCC::GetSuccessCount().QuadPart; }
  43. private:
  44. BOOL m_bRunning;
  45. };
  46. #endif