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
58 lines
1.7 KiB
/*******************************************************************
|
|
*
|
|
* DESCRIPTION: ARGUS Kernel Header File
|
|
*
|
|
* AUTHOR: gagua
|
|
*
|
|
* HISTORY:
|
|
*
|
|
* DATE:5/29/2019
|
|
*
|
|
*******************************************************************/
|
|
#ifndef __ARGUS_KERNEL_HEADER__
|
|
#define __ARGUS_KERNEL_HEADER__
|
|
|
|
#include <linux/videodev2.h>
|
|
#include <linux/types.h>
|
|
|
|
#include "../../alg/generic/md5.h"
|
|
#include "../../components/base/basicThread.h"
|
|
#include "../../components/base/basicEngine.h"
|
|
#include "../../components/base/basicSettingsProvider.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
|
|
#define SLEEP_KERNEL_INTERVAL 10
|
|
#define ONVIF_DISCOVERY_INTERVAL 300 // 5 min
|
|
#define ONVIF_DISCOVERY_RESULT_TIME 5
|
|
|
|
#define ARGUS_KERNEL_TAG_SITE_ID "SITE_ID"
|
|
#define ARGUS_KERNEL_TAG_SERVER_IDENTITY "IDENTITY"
|
|
|
|
#define ARGUS_NODE_SOCK_TYPE_SERIAL_PORT 1
|
|
#define ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER 2
|
|
#define ARGUS_NODE_SOCK_TYPE_NETWORK 3
|
|
|
|
class ARGUS_Kernel: public basicThread {
|
|
private:
|
|
uint32_t m_nSiteID;
|
|
char m_sIdentity[33];
|
|
time_t m_tTimeTSeconds;
|
|
basicLogCollection * m_pLog;
|
|
basicEventHeap * m_pEventHeap;
|
|
config_setting_t * m_pSettings;
|
|
uint8_t m_bExitCause;
|
|
protected:
|
|
void m_fThreadProc( void );
|
|
public:
|
|
// Constructor
|
|
explicit ARGUS_Kernel( config_setting_t *Settings = NULL );
|
|
// Destructor
|
|
virtual ~ARGUS_Kernel();
|
|
bool create( void );
|
|
void WaitFinish( bool Force = false );
|
|
bool setStatus( int );
|
|
uint8_t getExitCause( void ){ return m_bExitCause;};
|
|
};
|
|
|
|
|
|
#endif
|