1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #pragma once
- // 下列 ifdef 块是创建使从 DLL 导出更简单的
- // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 GENV2ADAPTER_EXPORTS
- // 符号编译的。在使用此 DLL 的
- // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
- // GENV2ADAPTER_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
- // 符号视为是被导出的。
- #ifndef GENV2ADAPTER_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "GenV2AdapterX64D.lib")
- #else
- #pragma comment(lib, "GenV2AdapterX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "GenV2AdapterD.lib")
- #else
- #pragma comment(lib, "GenV2Adapter.lib")
- #endif
- #endif
- #endif
- #ifdef GENV2ADAPTER_EXPORTS
- #define GENV2ADAPTER_API __declspec(dllexport)
- #define GENV2ADAPTER_C_API extern "C" __declspec(dllexport)
- #else
- #define GENV2ADAPTER_API __declspec(dllimport)
- #define GENV2ADAPTER_C_API extern "C" __declspec(dllimport)
- #endif
- #include "GeneratorDriver.h"
- #include "UIObject.h"
- // 此类是从 GenV2Adapter.dll 导出的
- class GENV2ADAPTER_API GenV2Adapter : public GeneratorDriver
- {
- std::string *m_pWorkpath;
- UIObject *m_pUIOBJ;
- bool m_bGenConnectState;
- string *m_pstrGenType;
- MechV2 *m_pMech;
- CollimatorLogic *m_pCollimator;
- GenUnitLogic *m_pDose;
- SyncHSW_LogicDevice *m_pHsw;
- SyncGen_LogicDeviceEx *m_pSync;
- public:
- GenV2Adapter(void);
- virtual ~GenV2Adapter(void);
- virtual bool SYSTEM_CALL Driver_Probe(ResDataObject& PARAM_OUT HardwareInfo);
- virtual bool SetDriverWorkPath(const char *pWorkPath);
- virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
- virtual void SYSTEM_CALL UnloadDriver();
- bool InitConfiguration();
- //actions
- virtual bool Connect();
- virtual void DisConnect();
- //virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
- virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
- //逻辑设备树的加载和卸载
- virtual PVOID SYSTEM_CALL LoadLogicDevices();
- virtual void SYSTEM_CALL UnloadLogicDevices();
- virtual bool SYSTEM_CALL OnHeartBeat();
- virtual bool Device_Probe(ResDataObject &HardwareInfo);
- virtual DWORD SYSTEM_CALL OnNotify(HANDLE evtList[], DWORD count);
- };
- GENV2ADAPTER_C_API DriverDPC* GetDriverDPC();
- GENV2ADAPTER_C_API void ReleaseDriverDPC(DriverDPC *p);
|