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.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: LgMaskScheduleEngine.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgMaskScheduleEngine.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__MASK__SCHEDULE__ENGINE__H__INCLUDED__
  15. #define __LG__MASK__SCHEDULE__ENGINE__H__INCLUDED__
  16. #include "LgMaskScheduleTypes.h"
  17. typedef void (*PMASK_SWITCH_CALLBACK)( LPVOID pParam, CLgMaskScheduleLgsSwitch& arrSwitch );
  18. class CLgMaskScheduleEngine
  19. {
  20. public:
  21. CLgMaskScheduleEngine();
  22. virtual ~CLgMaskScheduleEngine();
  23. public:
  24. BOOL Create( PMASK_SWITCH_CALLBACK pMaskScheduleCallback, LPVOID lParam );
  25. void Destroy();
  26. BOOL Load( LPCTSTR pFileName );
  27. BOOL Save( LPCTSTR pFileName );
  28. void OnTimer( SYSTEMTIME *pST );
  29. public:
  30. BOOL Add( PMASK_SCHEDULE pHzSchedule );
  31. BOOL Delete( INT nIndex );
  32. void DeleteAll();
  33. public:
  34. void MaskSwitch( CLgMaskScheduleLgsSwitch &arrSwitch );
  35. public:
  36. void UpdateSchedule( INT nIndex );
  37. public:
  38. CLgScheduleArray& GetScheduleArray() { return m_HzScheduleArray; }
  39. private:
  40. CLgScheduleArray m_HzScheduleArray;
  41. private:
  42. INT m_nDayOfWeek;
  43. private:
  44. PMASK_SWITCH_CALLBACK m_pMaskScheduleCallback;
  45. LPVOID m_pMaskScheduleCallbackParam;
  46. private:
  47. LARGE_INTEGER m_liNextTimeInSec;
  48. DWORD m_dwNextTimeInSecUpdate;
  49. };
  50. #endif