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
64 lines
2.1 KiB
//----------------------------------------------------------------------------
|
|
// Dr.Frucht Systems Ltd.
|
|
// Copyright © 2000-2022. All Rights Reserved.
|
|
// Version 1.0 11/19/2022
|
|
// Last modification: 11/19/2022
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: mojoKernel.h
|
|
// AUTHOR: gagua
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of mojoKernel.cpp
|
|
//----------------------------------------------------------------------------
|
|
//
|
|
|
|
#ifndef __MOJO_KERNEL_H_INCL__
|
|
#define __MOJO_KERNEL_H_INCL__
|
|
|
|
#define LA_METRO 1
|
|
#define MER_INC 2
|
|
|
|
#define NOTARGET_SESSION_CLOSE 300 //sec
|
|
|
|
#include "../../components/base/basicThread.h"
|
|
#include "../../components/base/basicSettingsProvider.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
#include "../../components/object/objectSystemAnchor.h"
|
|
#include "../../alg/lgs/detectorStructures.h"
|
|
#include "../../alg/lgs/detector.h"
|
|
#include "../../alg/lgs/mask.h"
|
|
#include "../../alg/generic/md5.h"
|
|
|
|
#include "../common/kernelPrototype.h"
|
|
#include "lifeMonitoring.h"
|
|
#include "servaRemoteClient.h"
|
|
|
|
#define MAX_CYCLE_COUNTER_VALUE 0xFFFFFFFF;
|
|
#define SLEEP_KERNEL_INTERVAL 10 // 10 millisecond
|
|
#define TIME_SYNC_INTERVAL 900000 // 15 minute(s) in 1 millisecond units
|
|
#define STATUS_OK_INTERVAL 2000 // 2 Sec in 1 millisecond units
|
|
|
|
class servaKernel: public kernelPrototype{
|
|
private:
|
|
static servaKernel * _instance;
|
|
servaLifeMonitoring * m_pLifeMonitor;
|
|
servaRemoteClient * m_pRPC;
|
|
protected:
|
|
virtual void m_fThreadProc( void );
|
|
// Constructor
|
|
explicit servaKernel( config_setting_t *ptr );
|
|
public:
|
|
static servaKernel * getInstance( config_setting_t *ptr = NULL );
|
|
// Destructor
|
|
virtual ~servaKernel();
|
|
virtual bool create();
|
|
// Functionality (implementatio in servaKernelToolKit.cpp )
|
|
bool registerMojo();
|
|
|
|
friend class servaRemoteClient;
|
|
friend class servaRPCHadnler;
|
|
|
|
};
|
|
|
|
#endif // __MOJJO_KERNEL_H_INCL__
|