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.

64 lines
2.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
​
​
  1. //----------------------------------------------------------------------------
  2. // Dr.Frucht Systems Ltd.
  3. // Copyright � 2000-2022. All Rights Reserved.
  4. // Version 1.0 11/19/2022
  5. // Last modification: 11/19/2022
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: mojoKernel.h
  9. // AUTHOR: gagua
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of mojoKernel.cpp
  13. //----------------------------------------------------------------------------
  14. //
  15. #ifndef __MOJO_KERNEL_H_INCL__
  16. #define __MOJO_KERNEL_H_INCL__
  17. #define LA_METRO 1
  18. #define MER_INC 2
  19. #define NOTARGET_SESSION_CLOSE 300 //sec
  20. #include "../../components/base/basicThread.h"
  21. #include "../../components/base/basicSettingsProvider.h"
  22. #include "../../components/base/basicEventHeap.h"
  23. #include "../../components/object/objectSystemAnchor.h"
  24. #include "../../alg/lgs/detectorStructures.h"
  25. #include "../../alg/lgs/detector.h"
  26. #include "../../alg/lgs/mask.h"
  27. #include "../../alg/generic/md5.h"
  28. #include "../common/kernelPrototype.h"
  29. #include "lifeMonitoring.h"
  30. #include "servaRemoteClient.h"
  31. #define MAX_CYCLE_COUNTER_VALUE 0xFFFFFFFF;
  32. #define SLEEP_KERNEL_INTERVAL 10 // 10 millisecond
  33. #define TIME_SYNC_INTERVAL 900000 // 15 minute(s) in 1 millisecond units
  34. #define STATUS_OK_INTERVAL 2000 // 2 Sec in 1 millisecond units
  35. class servaKernel: public kernelPrototype{
  36. private:
  37. static servaKernel * _instance;
  38. servaLifeMonitoring * m_pLifeMonitor;
  39. servaRemoteClient * m_pRPC;
  40. protected:
  41. virtual void m_fThreadProc( void );
  42. // Constructor
  43. explicit servaKernel( config_setting_t *ptr );
  44. public:
  45. static servaKernel * getInstance( config_setting_t *ptr = NULL );
  46. // Destructor
  47. virtual ~servaKernel();
  48. virtual bool create();
  49. // Functionality (implementatio in servaKernelToolKit.cpp )
  50. bool registerMojo();
  51. friend class servaRemoteClient;
  52. friend class servaRPCHadnler;
  53. };
  54. #endif // __MOJJO_KERNEL_H_INCL__