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.

53 lines
1.1 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: DirectOutput.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of DirectOutput.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __RELAY__H__INCLUDED__
  15. #define __RELAY__H__INCLUDED__
  16. #include "..\..\LgLib\Templ.h"
  17. class CDirectOutput
  18. {
  19. public:
  20. CDirectOutput();
  21. virtual ~CDirectOutput();
  22. protected:
  23. friend class CDeviceDO;
  24. public:
  25. void CmdOn( BOOL bOn );
  26. BOOL ConnectToDevice( CDeviceDO *pDeviceDO, int nBit, int nSensorBit );
  27. public:
  28. int GetSubIndex() { return m_nSubIndex; }
  29. protected:
  30. enum{ DOC_SET_STATE };
  31. struct DOEVENT
  32. {
  33. BYTE id;
  34. BOOL bOn;
  35. };
  36. CLgQueueP<DOEVENT,100> m_Queue;
  37. protected:
  38. friend class CSensor;
  39. void PostOn( BOOL bOn );
  40. CDeviceDO *m_pDeviceDO;
  41. int m_nBit;
  42. int m_nSubIndex;
  43. };
  44. #endif