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.

58 lines
1.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*******************************************************************
  2. *
  3. * DESCRIPTION: ARGUS Kernel Header File
  4. *
  5. * AUTHOR: gagua
  6. *
  7. * HISTORY:
  8. *
  9. * DATE:5/29/2019
  10. *
  11. *******************************************************************/
  12. #ifndef __ARGUS_KERNEL_HEADER__
  13. #define __ARGUS_KERNEL_HEADER__
  14. #include <linux/videodev2.h>
  15. #include <linux/types.h>
  16. #include "../../alg/generic/md5.h"
  17. #include "../../components/base/basicThread.h"
  18. #include "../../components/base/basicEngine.h"
  19. #include "../../components/base/basicSettingsProvider.h"
  20. #include "../../components/base/basicEventHeap.h"
  21. #define SLEEP_KERNEL_INTERVAL 10
  22. #define ONVIF_DISCOVERY_INTERVAL 300 // 5 min
  23. #define ONVIF_DISCOVERY_RESULT_TIME 5
  24. #define ARGUS_KERNEL_TAG_SITE_ID "SITE_ID"
  25. #define ARGUS_KERNEL_TAG_SERVER_IDENTITY "IDENTITY"
  26. #define ARGUS_NODE_SOCK_TYPE_SERIAL_PORT 1
  27. #define ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER 2
  28. #define ARGUS_NODE_SOCK_TYPE_NETWORK 3
  29. class ARGUS_Kernel: public basicThread {
  30. private:
  31. uint32_t m_nSiteID;
  32. char m_sIdentity[33];
  33. time_t m_tTimeTSeconds;
  34. basicLogCollection * m_pLog;
  35. basicEventHeap * m_pEventHeap;
  36. config_setting_t * m_pSettings;
  37. uint8_t m_bExitCause;
  38. protected:
  39. void m_fThreadProc( void );
  40. public:
  41. // Constructor
  42. explicit ARGUS_Kernel( config_setting_t *Settings = NULL );
  43. // Destructor
  44. virtual ~ARGUS_Kernel();
  45. bool create( void );
  46. void WaitFinish( bool Force = false );
  47. bool setStatus( int );
  48. uint8_t getExitCause( void ){ return m_bExitCause;};
  49. };
  50. #endif