AbstractDose.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 WHEELDPC_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // SYNCFPDDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #ifndef ABSTRACTDOSE_EXPORTS
  8. #ifdef _WIN64
  9. #ifdef _DEBUG
  10. #pragma comment(lib, "AbstractDoseX64D.lib")
  11. #else
  12. #pragma comment(lib, "AbstractDoseX64.lib")
  13. #endif
  14. #else
  15. #ifdef _DEBUG
  16. #pragma comment(lib, "AbstractDoseD.lib")
  17. #else
  18. #pragma comment(lib, "AbstractDose.lib")
  19. #endif
  20. #endif
  21. #endif
  22. #define PARAM_IN_TYPE
  23. #ifdef ABSTRACTDOSE_EXPORTS
  24. #define ABSTRACTDOSE_API __declspec(dllexport)
  25. #else
  26. #define ABSTRACTDOSE_API __declspec(dllimport)
  27. #endif
  28. #include "LogicDevice.h"
  29. #include "diosthread.h"
  30. #include "CommonLogicClient.h"
  31. #include <map>
  32. class ABSTRACTDOSE_API AbstractDose : public LogicDevice
  33. {
  34. public:
  35. AbstractDose(void);
  36. virtual ~AbstractDose(void);
  37. void *m_pData;
  38. void *m_pNotify;
  39. //get device type
  40. virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  41. //get device resource
  42. virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
  43. //ResourceCommand Request In and Response Out
  44. virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse);
  45. //notify to lower layer
  46. virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd);
  47. RET_STATUS SetAction(const char *ActionName, ResDataObject &Req, ResDataObject &Resp);
  48. //errors,warnings
  49. void SetErrorInfo(int errCode, char *pErrInfo);
  50. void SetWarningInfo(int warningCode, char *pWarningInfo);
  51. protected:
  52. //HANDLE m_Thread;
  53. //HANDLE m_ExitFlag;
  54. //bool StartThread();
  55. //static DWORD WINAPI OnProcessThread(LPVOID pPara);
  56. //bool StopThread();
  57. public:
  58. int WaitforNotify(DWORD Index);
  59. void InitState( map<CommonLogicClient*, int> &objSM);
  60. bool StateAction(char*,map<CommonLogicClient*, int>& objSM);
  61. bool StateGuard(char*,map<CommonLogicClient*, int> &objSM);
  62. bool StateNotify(char* strState, bool bResult);
  63. bool work(DWORD Index);
  64. bool StartThread();
  65. bool StopThread();
  66. HANDLE *GetHandlelist(int &size);
  67. bool IsThreadRun();
  68. public:
  69. //fpd actions
  70. virtual RET_STATUS OpenLogicDevice();
  71. virtual RET_STATUS CloseLogicDevice();
  72. virtual RET_STATUS AddLogicDevice(const char* pPath);
  73. virtual RET_STATUS DelLogicDevice(const char* pPath);
  74. virtual RET_STATUS SetApplicationMode(ResDataObject &nApplicationMode); //RAD FLU
  75. virtual RET_STATUS SetExamMode(ResDataObject &nExamMode);
  76. virtual RET_STATUS SetAPR(ResDataObject &nAPR);
  77. virtual RET_STATUS ReadRealExploseStatus(ResDataObject& WorkStation);
  78. virtual RET_STATUS GetSEQResource(ResDataObject PARAM_OUT *pDeviceResource);
  79. virtual RET_STATUS SeqPrep();
  80. virtual RET_STATUS SeqReady();
  81. virtual RET_STATUS FramePrep();
  82. virtual RET_STATUS FrameReady();
  83. virtual RET_STATUS FrameStart();
  84. virtual RET_STATUS XWindowOn();
  85. virtual RET_STATUS FrameIn();
  86. virtual RET_STATUS FrameInComplete();
  87. virtual RET_STATUS FramePost();
  88. virtual RET_STATUS FramePostResult();
  89. virtual RET_STATUS FrameEnd();
  90. virtual RET_STATUS FrameEndResult();
  91. virtual RET_STATUS SeqPost();
  92. virtual RET_STATUS SeqPostResult();
  93. virtual RET_STATUS SetExamInfo(ResDataObject &nExamInfo);
  94. virtual RET_STATUS SetWorkStation(ResDataObject &nWorkStation);
  95. virtual RET_STATUS SetEXPOSURESTEP(ResDataObject &nWorkStation);
  96. virtual RET_STATUS SetTOTALEXPOSURESTEP(ResDataObject &nWorkStation);
  97. virtual RET_STATUS SelectExamMode(ResDataObject &ExamIndex);
  98. virtual RET_STATUS EnterExp();
  99. virtual RET_STATUS AcceptExp(ResDataObject &nWorkStation);
  100. virtual RET_STATUS ImageReady(ResDataObject &nStatus);
  101. //we need check each action resource is Support or not
  102. //return yes or no inside of OEM module
  103. virtual RET_STATUS Support_SetSyncMode();
  104. virtual RET_STATUS Support_SetXWindowTime();
  105. virtual RET_STATUS Support_SetApplicationMode();
  106. virtual RET_STATUS Support_SetExamMode();
  107. virtual RET_STATUS Support_GetSEQResource();
  108. virtual RET_STATUS Support_SeqPrep();
  109. virtual RET_STATUS Support_SeqReady();
  110. virtual RET_STATUS Support_FramePrep();
  111. virtual RET_STATUS Support_FrameReady();
  112. virtual RET_STATUS Support_FrameStart();
  113. virtual RET_STATUS Support_XWindowOn();
  114. virtual RET_STATUS Support_FrameIn();
  115. virtual RET_STATUS Support_FrameInComplete();
  116. virtual RET_STATUS Support_FramePost();
  117. virtual RET_STATUS Support_FramePostResult();
  118. virtual RET_STATUS Support_FrameEnd();
  119. virtual RET_STATUS Support_FrameEndResult();
  120. virtual RET_STATUS Support_SeqPost();
  121. virtual RET_STATUS Support_SeqPostResult();
  122. virtual RET_STATUS Support_SetValue(int PARAM_IN_TYPE ParamType);
  123. };