#define NEWMODELDPC_API #define NEWMODELDPC_C_API extern "C" #include "ModuleDriver.h" #include "VirtualDevice.h" #include "CCOS.Dev.IODevice.hpp" #include #include #include #include NEWMODELDPC_C_API DriverDPC* GetDriverDPC(); NEWMODELDPC_C_API void ReleaseDriverDPC(DriverDPC *p); namespace nsDEV = CCOS::Dev; typedef int (*ImageProcessAPI)(int , std::string& , char* , char*, DWORD , LogicDevice* , LogicDevice* ); class NewModelDevice; class NEWMODELDPC_API NewModelDPC : public ModuleDriver { friend class NewModelDevice; std::string *m_pWorkpath; int m_nServerIdx; //同SDK 的索引 std::unique_ptr m_NewDevManager; //IODriver对象 void* m_Module; bool InitDeviceMgr(const char *pDriverpath); bool LoadVirtualDevice(const char* pDevicePath, bool isImgDevice = false, bool bAddToList = true, std::string devPath="", std::string devSrvPath=""); //图像处理设备x个,消息处理设备x个 std::vector m_arrImgeProcessDevices; std::vector m_arrImgeFunc; std::vector m_arrMessageProcessDevices; LogicDevice* m_MainHostDevice; void* m_hImgeDeviceHandle; void* m_hMessageDeviceHandle; ResDataObject m_resHardwareInfo; int ImageRrocess(int Type, std::string& imageHead, ResDataObject& resContext, char* pFrameBuff, DWORD FrameSize, NewModelDevice* pDeviceFrom); int NotifyMessageProcess(ResDataObject& resNotify, NewModelDevice* pDeviceFrom); public: NewModelDPC(void); virtual ~NewModelDPC(void) override; virtual bool DriverEntry(ResDataObject &Configuration) override; virtual bool GetDeviceType(GUID &DevType) override; //virtual void SubscribeSelf() override; virtual bool SetDriverWorkPath(const char *pWorkPath) override; RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject *pDeviceResource); virtual bool SYSTEM_CALL Driver_Probe(ResDataObject& PARAM_OUT HardwareInfo) override; virtual bool SYSTEM_CALL Device_Probe(ResDataObject& PARAM_OUT HardwareInfo) override; virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath) override; virtual bool Connect() override; virtual bool SYSTEM_CALL GetConnectionStatus() override; virtual void DisConnect() override; virtual bool SYSTEM_CALL OnHeartBeat() override; virtual PVOID LoadLogicDevices() override; virtual void UnloadLogicDevices() override; virtual RET_STATUS DATA_ACTION GetDeviceConfig(ResDataObject PARAM_OUT* pDeviceConfig) override; virtual RET_STATUS DATA_ACTION SetDeviceConfig(ResDataObject PARAM_IN* DeviceConfig) override; RET_STATUS OnAction(const char* pszActionName, const char* pszParams, ResDataObject& resResponse); DWORD SYSTEM_CALL OnNotify(std::vector> evtList, DWORD count); };