// 下列 ifdef 块是创建使从 DLL 导出更简单的 // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 WHEELDPC_EXPORTS // 符号编译的。在使用此 DLL 的 // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 // SYNCFPDDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 // 符号视为是被导出的。 #ifndef ABSTRACTDOSE_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "AbstractDoseX64D.lib") #else #pragma comment(lib, "AbstractDoseX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "AbstractDoseD.lib") #else #pragma comment(lib, "AbstractDose.lib") #endif #endif #endif #define PARAM_IN_TYPE #ifdef ABSTRACTDOSE_EXPORTS #define ABSTRACTDOSE_API __declspec(dllexport) #else #define ABSTRACTDOSE_API __declspec(dllimport) #endif #include "LogicDevice.h" #include "diosthread.h" #include "CommonLogicClient.h" #include class ABSTRACTDOSE_API AbstractDose : public LogicDevice { public: AbstractDose(void); virtual ~AbstractDose(void); void *m_pData; void *m_pNotify; //get device type 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); RET_STATUS SetAction(const char *ActionName, ResDataObject &Req, ResDataObject &Resp); //errors,warnings void SetErrorInfo(int errCode, char *pErrInfo); void SetWarningInfo(int warningCode, char *pWarningInfo); protected: //HANDLE m_Thread; //HANDLE m_ExitFlag; //bool StartThread(); //static DWORD WINAPI OnProcessThread(LPVOID pPara); //bool StopThread(); public: int WaitforNotify(DWORD Index); void InitState( map &objSM); bool StateAction(char*,map& objSM); bool StateGuard(char*,map &objSM); bool StateNotify(char* strState, bool bResult); bool work(DWORD Index); bool StartThread(); bool StopThread(); HANDLE *GetHandlelist(int &size); bool IsThreadRun(); public: //fpd actions virtual RET_STATUS OpenLogicDevice(); virtual RET_STATUS CloseLogicDevice(); virtual RET_STATUS AddLogicDevice(const char* pPath); virtual RET_STATUS DelLogicDevice(const char* pPath); virtual RET_STATUS SetApplicationMode(ResDataObject &nApplicationMode); //RAD FLU virtual RET_STATUS SetExamMode(ResDataObject &nExamMode); virtual RET_STATUS SetAPR(ResDataObject &nAPR); virtual RET_STATUS ReadRealExploseStatus(ResDataObject& WorkStation); virtual RET_STATUS GetSEQResource(ResDataObject PARAM_OUT *pDeviceResource); virtual RET_STATUS SeqPrep(); virtual RET_STATUS SeqReady(); virtual RET_STATUS FramePrep(); virtual RET_STATUS FrameReady(); virtual RET_STATUS FrameStart(); virtual RET_STATUS XWindowOn(); virtual RET_STATUS FrameIn(); virtual RET_STATUS FrameInComplete(); virtual RET_STATUS FramePost(); virtual RET_STATUS FramePostResult(); virtual RET_STATUS FrameEnd(); virtual RET_STATUS FrameEndResult(); virtual RET_STATUS SeqPost(); virtual RET_STATUS SeqPostResult(); virtual RET_STATUS SetExamInfo(ResDataObject &nExamInfo); virtual RET_STATUS SetWorkStation(ResDataObject &nWorkStation); virtual RET_STATUS SetEXPOSURESTEP(ResDataObject &nWorkStation); virtual RET_STATUS SetTOTALEXPOSURESTEP(ResDataObject &nWorkStation); virtual RET_STATUS SelectExamMode(ResDataObject &ExamIndex); virtual RET_STATUS EnterExp(); virtual RET_STATUS AcceptExp(ResDataObject &nWorkStation); virtual RET_STATUS ImageReady(ResDataObject &nStatus); //we need check each action resource is Support or not //return yes or no inside of OEM module virtual RET_STATUS Support_SetSyncMode(); virtual RET_STATUS Support_SetXWindowTime(); virtual RET_STATUS Support_SetApplicationMode(); virtual RET_STATUS Support_SetExamMode(); virtual RET_STATUS Support_GetSEQResource(); virtual RET_STATUS Support_SeqPrep(); virtual RET_STATUS Support_SeqReady(); virtual RET_STATUS Support_FramePrep(); virtual RET_STATUS Support_FrameReady(); virtual RET_STATUS Support_FrameStart(); virtual RET_STATUS Support_XWindowOn(); virtual RET_STATUS Support_FrameIn(); virtual RET_STATUS Support_FrameInComplete(); virtual RET_STATUS Support_FramePost(); virtual RET_STATUS Support_FramePostResult(); virtual RET_STATUS Support_FrameEnd(); virtual RET_STATUS Support_FrameEndResult(); virtual RET_STATUS Support_SeqPost(); virtual RET_STATUS Support_SeqPostResult(); virtual RET_STATUS Support_SetValue(int PARAM_IN_TYPE ParamType); };