123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #pragma once
- // 下列 ifdef 块是创建使从 DLL 导出更简单的
- // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 DETCTORDRIVER_EXPORTS
- // 符号编译的。在使用此 DLL 的
- // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
- // DETCTORDRIVER_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
- // 符号视为是被导出的。
- #ifndef DETCTORDRIVER_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "DetctorDriverX64D.lib")
- #else
- #pragma comment(lib, "DetctorDriverX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "DetctorDriverD.lib")
- #else
- #pragma comment(lib, "DetctorDriver.lib")
- #endif
- #endif
- #endif
- #include "LogicDriver.h"
- #include "Detector_Model_Def.h"
- #ifdef DETCTORDRIVER_EXPORTS
- #define DETCTORDRIVER_API __declspec(dllexport)
- #define DETCTORDRIVER_C_API extern "C" __declspec(dllexport)
- #else
- #define DETCTORDRIVER_API __declspec(dllimport)
- #define DETCTORDRIVER_C_API extern "C" __declspec(dllimport)
- #endif
- // 此类是从 DetctorDriver.dll 导出的
- class DETCTORDRIVER_API DetctorDriver :public LogicDriver
- {
- //2张表
- //AcqModeList
- AcqModeInfoListEx *m_pAcqModeList;
- //Work Status
- ResDataObject *m_pDetectorWorkStatus;//Acq or cali
- ResDataObject *m_pDetectorAttach;//Attach Result
- ResDataObject *m_pDetectorAttachFlag;//Attach Result
- ResDataObject* m_pDetectorConnectStatus;
- ResDataObject* m_pDetectorInitialStatus;
- ResDataObject* m_pDetectorUFWStatus;//UpdateFirmware result
- ResDataObject* m_pSyncData;//xwindowsize,syncmode,triggermode,xwindowstatus,framerate
- ResDataObject* m_pAttribute;
- ResDataObject* m_pDescription;
- public:
- DetctorDriver(void);
- virtual ~DetctorDriver(void);
- //基本接口
- virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
- //get device resource
- virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
- //ResourceCommand Request In and Response Out
- virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse);
- //notify to lower layer
- virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd);
- //对象接口
- virtual bool SYSTEM_CALL DriverEntry(ResDataObject& PARAM_IN Configuration);
- //配置相关。驱动中的配置信息全部通过driver的接口
- virtual RET_STATUS DATA_ACTION GetDeviceConfig(ResDataObject PARAM_OUT *pDeviceConfig);
- virtual RET_STATUS DATA_ACTION SetDeviceConfig(ResDataObject PARAM_IN *DeviceConfig);
- RET_STATUS SetConfigurationNotify(ResDataObject ResConfig);
- virtual RET_STATUS DATA_ACTION EnterExam(int nExamStatus);
- virtual RET_STATUS DATA_ACTION ExitExam();
- virtual RET_STATUS DATA_ACTION Attach();
- virtual RET_STATUS DATA_ACTION AttachConnect();
- virtual RET_STATUS OEM_IF SetAttachResult(bool result, const char* DetectorType, const char* DetectorSN);
- virtual RET_STATUS OEM_IF SetConnectStatus(int nStatus);
- virtual RET_STATUS DATA_ACTION GetConnectStatus(int & nStatus);
- virtual RET_STATUS DATA_ACTION SetAttachStatus(int nStatus);
- virtual RET_STATUS OEM_IF SetInitialStatus(int nStatus);
- virtual RET_STATUS OEM_IF SetUpdateFWStatus(int nStatus);
- virtual RET_STATUS DATA_ACTION ResetConnect();
- virtual RET_STATUS DATA_ACTION DisConnectFPD();
- virtual RET_STATUS DATA_ACTION UpdateFirmware();
- virtual RET_STATUS DATA_ACTION RecoverImage(bool bRecoverIt);
- virtual RET_STATUS DATA_ACTION SaveSensitivity();
- //继承类必须实现的行为1:与继承类共同实现功能
- virtual RET_STATUS OEM_IF PowerOnDetector();
- virtual RET_STATUS OEM_IF PowerOffDetector();
- virtual RET_STATUS OEM_IF SleepDetector();
- virtual RET_STATUS OEM_IF WakeupDetector();
- virtual RET_STATUS OEM_IF ActiveDetector();
- virtual DETECTOR_STATUS OEM_IF GetDetectorStatus();
- virtual RET_STATUS OEM_IF SetDetectorStatus(DETECTOR_STATUS status);
- virtual RET_STATUS DATA_ACTION ResetError();
- AcqModeInfoListEx* OEM_IF GetAcqModeListObject();
- virtual RET_STATUS OEM_IF SendDetectorInfo(string strFDI);
- virtual RET_STATUS DATA_ACTION GetDetectorInfo(string & strFDI);
- };
|