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.
62 lines
2.0 KiB
62 lines
2.0 KiB
/*******************************************************************
|
|
*
|
|
* DESCRIPTION: ARGUS Kernel Header File
|
|
*
|
|
* AUTHOR: gagua
|
|
*
|
|
* HISTORY:
|
|
*
|
|
* DATE:5/29/2019
|
|
*
|
|
*******************************************************************/
|
|
#ifndef __ARGUS_KERNEL_HEADER__
|
|
#define __ARGUS_KERNEL_HEADER__
|
|
|
|
#include "../../components/base/basicThread.h"
|
|
#include "../../components/base/basicEngine.h"
|
|
#include "../../components/base/basicSettingsProvider.h"
|
|
#include "../../data/ponvif/ponvif.h"
|
|
#include "../../data/protocol/onvifMediaObserver.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
#include "../../rgoose/rgooseDBConnector.h"
|
|
#include "../../rgoose/rgooseIPCamera.h"
|
|
#include "../../data/net/netServer.h"
|
|
|
|
#define SLEEP_KERNEL_INTERVAL 10
|
|
#define ONVIF_DISCOVERY_INTERVAL 300 // 5 min
|
|
#define ONVIF_DISCOVERY_RESULT_TIME 5
|
|
|
|
|
|
class ARGUS_Kernel: public basicThread {
|
|
private:
|
|
time_t m_tTimeTSeconds;
|
|
basicLogCollection * m_pLog;
|
|
basicEventHeap * m_pEventHeap;
|
|
config_setting_t * m_pSettings;
|
|
uint8_t m_bExitCause;
|
|
ARGUS_DBC * m_pDBC;
|
|
networkServer * m_pNetClientsServer;
|
|
onvifMediaObserver * m_pOnvifMediaObserver;
|
|
bool m_bDiscoveryStarted;
|
|
vectorARGUS_Cameras m_vCameras;
|
|
vectorCamRecords m_vCamRecords;
|
|
vectorEventRecords m_vEvtRecords;
|
|
int isCameraListed( CSTR uid );
|
|
void validateCameras( void );
|
|
void validateEvents( int &lastTSS, int &lastTMS );
|
|
protected:
|
|
void m_fThreadProc( void );
|
|
public:
|
|
// Constructor
|
|
explicit ARGUS_Kernel( config_setting_t *Settings = NULL );
|
|
// Destructor
|
|
virtual ~ARGUS_Kernel();
|
|
bool create( void );
|
|
bool signalEvent( void );
|
|
void WaitFinish( bool Force = false );
|
|
bool setStatus( int );
|
|
uint8_t getExitCause( void ){ return m_bExitCause;};
|
|
};
|
|
|
|
|
|
#endif
|