// 下列 ifdef 块是创建使从 DLL 导出更简单的 // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 SUBSYSTEM_EXPORTS // 符号编译的。在使用此 DLL 的 // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 // SUBSYSTEM_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 // 符号视为是被导出的。 #pragma once #ifdef USSUBSYSTEM_EXPORTS #define USSUBSYSTEM_API __declspec(dllexport) #else #define USSUBSYSTEM_API __declspec(dllimport) #endif #ifndef USSUBSYSTEM_EXPORTS #ifdef WIN_64BIT #ifdef _DEBUG #pragma comment(lib, "USSubSystemX64D.lib") #else #pragma comment(lib, "USSubSystemX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "USSubSystemD.lib") #else #pragma comment(lib, "USSubSystem.lib") #endif #endif #endif //#include "logicdevice.h" //#include "CommonLogicClient.h" //#include "DIOSLogicDeviceStructure.h" //#include //using namespace std; #include "commonDataStruct.h" // 此类是从 SubSystem.dll 导出的 class USSUBSYSTEM_API CUSSubSystem : public LogicDevice { public: CUSSubSystem(void); virtual ~CUSSubSystem(void); // TODO: 在此添加您的方法。 public: void *m_pData; void *m_pThread; //ResourceCommand Request In and Response Out virtual RET_STATUS OpenLogicDevice(); virtual RET_STATUS CloseLogicDevice(); virtual bool SetSubSystemObj(CUSSubSystem *p); //get device type,returns device type GUID virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType); //notify to lower layer virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd); //get device resource virtual RET_STATUS GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource); virtual RET_STATUS Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse); virtual RET_STATUS SetApplicationMode(ResDataObject nApplicationMode); virtual RET_STATUS GetApplicationType(const char PARAM_OUT *applicationtype); //UI通过该接口获取数据容器中的参数 virtual RET_STATUS GetECMData(const char PARAM_OUT *pParam); virtual RET_STATUS SetUSMode(int mode); virtual RET_STATUS StartUSAcq(); virtual RET_STATUS StopUSAcq(); //获取抽象设备路径 提供给驱动调用的接口 //virtual RET_STATUS SetAbstrctlogicPath(const char* PARAM_IN AbstractName, const char*PARAM_IN Abstractpath) = 0; bool WaitforStateNotify(); protected: bool ProcessNotify(string strKey, ResDataObject ResNotify); private: };