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.
 
 
 
 
 
 

52 lines
1.8 KiB

#ifndef __IM_KERNEL_H_INCL__
#define __IM_KERNEL_H_INCL__
#include "../../lib/data/net/netServiceEngine.h"
#include "../../lib/components/base/basicThread.h"
#include "../../lib/components/base/basicSettingsProvider.h"
#include "IM_DataStructs.h"
#include "IM_DnnWorker.h"
#include "IM_DLibWorker.h"
#include "IM_DataBaseAdapter.h"
class networkClientHandler;
/**
* TODO: Add class description
*
* @author Gagua
*/
class IM_Kernel : public networkServiceEngine, public basicThread {
private:
basicLogCollection * m_pLog;
config_setting_t * m_pSettings;
basicEventHeap * m_pEvtHeap;
IM_DataBaseAdapter * m_pDBA;
uint8_t m_bExitCause;
IM_DnnWorker * m_pWorker;
IM_DlibWorker * m_pRecognizer;
IM_JOB_QUEUE m_qJOBS;
IM_JOB * m_pActiveJob;
protected:
virtual void m_fThreadProc( void );
public:
static IM_Kernel * getInstance();
// Destructor
virtual ~IM_Kernel();
bool signalEvent( void );
virtual bool start();
virtual bool stop( bool Force = false );
uint8_t getExitCause( void ){ return m_bExitCause;};
virtual networkClientHandler * attachNewClient( int SocketID );
virtual bool detachClient( networkClientHandler *ptr );
bool enqueueJob( IM_JOB *ptr );
//IM_RESULT * getResult( IM_JOB *ptr );
private:
static IM_Kernel * _instance;
// Constructor
explicit IM_Kernel( config_setting_t * Settings = NULL );
};
#endif // __IM_KERNEL_H_INCL__