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.

61 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: LgNetDeviceGPIOCOM.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgNetDeviceGPIOCOM.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__NET__DEVICE__GPIO__COM__H__INCLUDED__
  15. #define __LG__NET__DEVICE__GPIO__COM__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "LgNetDevice.h"
  20. #include "LgNetMessageGPIO.h"
  21. #include "..\Thread.h"
  22. #include "..\Device\LgDeviceGPIOCOM.h"
  23. class CLgNetDeviceGPIOCOM :
  24. public CLgNetDevice,
  25. public CLgDeviceGPIOCOM,
  26. private CLgThread
  27. {
  28. public:
  29. CLgNetDeviceGPIOCOM();
  30. virtual ~CLgNetDeviceGPIOCOM();
  31. public:
  32. BOOL Create( LPCTSTR pPort, BOOL bSelfTest, INT nSelfTestTimeout );
  33. void Destroy();
  34. protected:
  35. // events
  36. virtual void OnEvtGetOutput( INT nOutput, BOOL bOn );
  37. virtual void OnEvtSetOutput( INT nOutput, BOOL bOn );
  38. virtual void OnEvtGetOutputAll( PGPIO_PINS pPins );
  39. virtual void OnEvtGetInput( INT nInput, BOOL bOn );
  40. virtual void OnEvtGetInputAll( PGPIO_PINS pPins );
  41. virtual void OnEvtInputChange( INT nInput, BOOL bOn );
  42. virtual void OnEvtCommandError( INT nCommand, LPCTSTR pFormat, ... );
  43. protected:
  44. // inherit from thread
  45. virtual DWORD ThreadProc();
  46. protected:
  47. CLgNetMessageGPIO m_InMsg;
  48. CLgNetMessageGPIO m_OutMsg;
  49. };
  50. #endif