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.

70 lines
1.7 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: Patrol.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of Patrol.h
  13. //----------------------------------------------------------------------------
  14. // Patrol.h: interface for the CPatrol class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_)
  18. #define AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "FileStructs.h"
  23. class CSensor;
  24. class CSensorArray;
  25. class CPatrol
  26. {
  27. public:
  28. BYTE CheckSensor( CSensor *pSensor, LPBYTE byte );
  29. void CheckTime();
  30. void LinkSensor( CSensor* pSensor );
  31. BOOL IsActive( int nIndex );
  32. void Activate( int nIndex, BOOL bActive );
  33. BOOL Load( CFile& file );
  34. CPatrol();
  35. virtual ~CPatrol();
  36. int GetCount() { return m_nPatrolsCount; }
  37. LPSTR GetName( int nIndex ) { return m_pPatrols[nIndex].pName; }
  38. void SetSensorArray( CSensorArray *pSensorArray );
  39. private:
  40. struct PATROL
  41. {
  42. CHAR pName[STRING_MAX];
  43. int nCount;
  44. struct POINT
  45. {
  46. CSensor *pSensor;
  47. int nAddress;
  48. int nBitMask;
  49. int nTime;
  50. int nTolerance;
  51. }*pPoints;
  52. BOOL bActive;
  53. DWORD minTime;
  54. DWORD maxTime;
  55. int nActive;
  56. };
  57. PATROL *m_pPatrols;
  58. int m_nPatrolsCount;
  59. CSensorArray *m_pSensorArray;
  60. HANDLE m_hMutex;
  61. };
  62. #endif // !defined(AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_)