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.

65 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: Laserguard libraries
  7. // SUBSYSTEM: Devices support library
  8. // FILE: LgDevice.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of CLgDevice
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__DEVICE__H__INCLUDED__
  15. #define __LG__DEVICE__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. class CLgDevice
  20. {
  21. public:
  22. CLgDevice();
  23. virtual ~CLgDevice();
  24. public:
  25. typedef struct DEVICE_CMD_ERROR
  26. {
  27. INT nCommand;
  28. TCHAR pErrorText[MAX_PATH];
  29. }DEVICE_CMD_ERROR, *PDEVICE_CMD_ERROR;
  30. protected:
  31. virtual void OnEvtCommandError( INT nCommand, LPCTSTR pFormat, ... ) = 0;
  32. public:
  33. enum
  34. {
  35. CMD_NONE = 0x00,
  36. CMD_DEVICE = 0x01,
  37. EVT_NONE = 0x80,
  38. EVT_COMMAND_ERROR = 0x81,
  39. EVT_DEVICE = 0x82,
  40. };
  41. protected:
  42. // commands processing
  43. BOOL DoCmd( INT nCommand );
  44. // called to get new message
  45. INT GetCmd();
  46. void ReleaseCmd();
  47. // check availibility
  48. BOOL IsReadyForCmd();
  49. private:
  50. // commands proce4ssing variables
  51. BOOL m_bReadyForCmd;
  52. INT m_nCmd;
  53. BOOL m_bCmdExist;
  54. };
  55. #endif