123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- // 下列 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 <map>
- 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<CommonLogicClient*, int> &objSM);
- bool StateAction(char*,map<CommonLogicClient*, int>& objSM);
- bool StateGuard(char*,map<CommonLogicClient*, int> &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);
- };
|