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.

96 lines
2.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: DeviceLGS.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of DeviceLGS.cpp
  13. //----------------------------------------------------------------------------
  14. // DeviceLGS.cpp: implementation of the CDeviceLGS class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #include "stdafx.h"
  18. //#include "chicago.h"
  19. #include "DeviceLGS.h"
  20. #include "..\..\LgLib\Version.h"
  21. #ifdef _DEBUG
  22. #undef THIS_FILE
  23. static char THIS_FILE[]=__FILE__;
  24. #define new DEBUG_NEW
  25. #endif
  26. //////////////////////////////////////////////////////////////////////
  27. // Construction/Destruction
  28. //////////////////////////////////////////////////////////////////////
  29. CDeviceLGS::CDeviceLGS()
  30. {
  31. m_pSensor = NULL;
  32. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDeviceLGS::CDeviceLGS") );
  33. }
  34. CDeviceLGS::~CDeviceLGS()
  35. {
  36. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDeviceLGS::~CDeviceLGS") );
  37. }
  38. BOOL CDeviceLGS::LGS_PostReset()
  39. {
  40. LGSEVENT event;
  41. event.id = LGSC_RESET;
  42. return m_Queue.Push( event );
  43. }
  44. BOOL CDeviceLGS::LGS_PostRestart()
  45. {
  46. LGSEVENT event;
  47. event.id = LGSC_RESTART;
  48. return m_Queue.Push( event );
  49. }
  50. BOOL CDeviceLGS::LGS_PostEnable( BOOL bEnable )
  51. {
  52. LGSEVENT event;
  53. event.id = LGSC_ENABLE;
  54. event.bEnable = bEnable;
  55. return m_Queue.Push( event );
  56. }
  57. BOOL CDeviceLGS::LGS_PostGetHiddenZones()
  58. {
  59. LGSEVENT event;
  60. event.id = LGSC_GET_HZ;
  61. return m_Queue.Push( event );
  62. }
  63. BOOL CDeviceLGS::LGS_PostSetHiddenZones( CLgDeviceLGS::LGS_HZ_ARRAY& HzArray )
  64. {
  65. LGSEVENT event;
  66. event.id = LGSC_SET_HZ;
  67. event.HzArray = HzArray;
  68. return m_Queue.Push( event );
  69. }
  70. BOOL CDeviceLGS::LGS_PostGetCalibrationTable( INT nDevice )
  71. {
  72. LGSEVENT event;
  73. event.id = LGSC_GET_CT;
  74. event.CtTable.nDevice = nDevice;
  75. return m_Queue.Push( event );
  76. }
  77. BOOL CDeviceLGS::LGS_PostSetCalibrationTable( CLgDeviceLGS::LGS_CALIBRATION_TABLE& cTable )
  78. {
  79. LGSEVENT event;
  80. event.id = LGSC_SET_CT;
  81. event.CtTable = cTable;
  82. return m_Queue.Push( event );
  83. }