You cannot 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
C++
58 lines
1.7 KiB
C++
#ifndef __GLOBAL_CORE_CTRL_H
|
|
#define __GLOBAL_CORE_CTRL_H
|
|
|
|
#include "baseInclude.h"
|
|
#include "icamera.h"
|
|
#include "iCoreCtrl.h"
|
|
#include "iImgProc.h"
|
|
#include "GlobalDataBase.h"
|
|
|
|
|
|
#ifdef _USE_SPIDER_LOG
|
|
#include "logSpider.h"
|
|
#define CORE_CTRL_INIT(a, b) SPIDER_LOG_INIT(a, b)
|
|
#define CORE_CTRL_LOG(value) SPIDER_LOG_STRING("corectrl", value)
|
|
#define CORE_CTRL_FREE() SPIDER_LOG_FREE()
|
|
#else
|
|
#define CORE_CTRL_INIT(a, b)
|
|
#define CORE_CTRL_LOG(value) tpDebugOut(value)
|
|
#define CORE_CTRL_FREE()
|
|
#endif
|
|
|
|
class CGlobalCoreCtrl : public ICameraCallback
|
|
{
|
|
public:
|
|
CGlobalCoreCtrl(const CORE_CTRL_IN_PARAM* pParam){
|
|
m_pCameraPool = NULL;
|
|
m_pImageProc = NULL;
|
|
m_pGlobalData = pParam->pGlobalData;
|
|
readCoreCtrlCfg();
|
|
}
|
|
~CGlobalCoreCtrl() {}
|
|
void AddCameraPool(ICameraPool* pCameraPool) { m_pCameraPool = pCameraPool; }
|
|
private:
|
|
void readCoreCtrlCfg();
|
|
virtual QVariant IGetVariantById(int nId);
|
|
virtual void INewCameraImage(const QVariantMap& vmap);
|
|
public:
|
|
TP_GLOBAL_DATA* m_pGlobalData;
|
|
TP_CORE_SETTING m_coreSetting;
|
|
ICameraPool* m_pCameraPool;
|
|
IImgProc* m_pImageProc;
|
|
};
|
|
|
|
// extern CGlobalCoreCtrl* gpData;
|
|
//
|
|
// #define gpCoreCtrlGlobal gpData
|
|
//
|
|
// #define gpGlobalData ((TP_GLOBAL_DATA*)(gpData->m_pGlobalData))
|
|
// #define gCoreSetting gpData->m_coreSetting
|
|
// #define glpCameralPool gpData->m_pCameraPool
|
|
// #define glpGuiCallback gpData->m_pGuiCallback
|
|
// #define gfcbGuiSetImage(...) if( NULL != glpGuiCallback ) glpGuiCallback->ISetCameraImage(__VA_ARGS__)
|
|
// #define gGuiCallback_FuncCall(fun, ...) if( NULL != glpGuiCallback ) glpGuiCallback->##fun##(__VA_ARGS__)
|
|
//
|
|
// #define glpImgProc gpData->m_pImageProc
|
|
|
|
|
|
#endif |