// 下列 ifdef 块是创建使从 DLL 导出更简单的 // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 WHEELDPC_EXPORTS // 符号编译的。在使用此 DLL 的 // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 // SYNCFPDDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 // 符号视为是被导出的。 #ifndef ABSTRACTMOTION_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "AbstractMotionX64D.lib") #else #pragma comment(lib, "AbstractMotionX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "AbstractMotionD.lib") #else #pragma comment(lib, "AbstractMotion.lib") #endif #endif #endif #ifdef ABSTRACTMOTION_EXPORTS #define ABSTRACTMOTION_API __declspec(dllexport) #else #define ABSTRACTMOTION_API __declspec(dllimport) #endif #include "LogicDevice.h" #include "CommonLogicClient.h" #include "diosthread.h" #include "DIOSLogicDeviceStructure.h" #include class ABSTRACTMOTION_API AbstractMotion : public LogicDevice { ResDataObject* m_pSyncData; public: AbstractMotion(void); virtual ~AbstractMotion(void); void *m_pData; void *m_pNotify; BaseJsonDataObject* m_nXWindowTime; //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); //errors,warnings void SetErrorInfo(int errCode, char *pErrInfo); void SetWarningInfo(int warningCode, char *pWarningInfo); bool work(DWORD Index); bool StartThread(); bool StopThread(); HANDLE *GetHandlelist(int &size); bool IsThreadRun(); protected: SM_STATUS m_SMState; bool m_bExposureSuccess; bool m_bSwitchStatus; //map m_mapError; public: int WaitforNotify(DWORD Index); bool StateNotify(char* strState, bool bResult); public: //fpd actions virtual RET_STATUS OpenLogicDevice(); virtual RET_STATUS CloseLogicDevice(); virtual RET_STATUS ResetSMState(); virtual RET_STATUS AddLogicDevice(string path); virtual RET_STATUS DelLogicDevice(string path); virtual RET_STATUS SetApplicationMode(ResDataObject nApplicationMode); //RAD FLU virtual RET_STATUS SetExamInfo(ResDataObject PARAM_IN& pParam); virtual RET_STATUS SelectExamMode(const char *pExamKey); virtual RET_STATUS GetSEQResource(ResDataObject PARAM_OUT *pDeviceResource); virtual RET_STATUS SeqPrep(); virtual RET_STATUS SeqReady(); virtual RET_STATUS FramePrep(); virtual RET_STATUS ExpEnableAction(); virtual RET_STATUS ExpEnableResult(CommonLogicClient* objSM, RES_SM SMResult); virtual RET_STATUS FrameReady(); virtual RET_STATUS FrameReadyResult(CommonLogicClient* objSM, RES_SM bResult); virtual RET_STATUS FrameStart(); virtual RET_STATUS FrameStartResult(CommonLogicClient* objSM, RES_SM SMResult); virtual RET_STATUS FrameIn(); virtual RET_STATUS FrameInComplete(CommonLogicClient* objSM, RES_SM SMResult); virtual RET_STATUS FramePost(); //virtual RET_STATUS FramePostResult(); virtual RET_STATUS FrameEnd(); virtual RET_STATUS FrameEndResult(); virtual RET_STATUS FrameError(); virtual RET_STATUS SeqPost(); virtual RET_STATUS SeqPostResult(); //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_SetExamInfo(); virtual RET_STATUS Support_GetSEQResource(); virtual RET_STATUS Support_SeqPrep(); virtual RET_STATUS Support_SeqReady(); virtual RET_STATUS Support_FramePrep(); virtual RET_STATUS Support_ExpEnable(); 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_FrameEnd(); virtual RET_STATUS Support_FrameError(); virtual RET_STATUS Support_SeqPost(); ///////////////////////////////////机架抽象需要的接口函////////////////////// virtual RET_STATUS INIT(); virtual RET_STATUS RESET(); virtual RET_STATUS SetFilter(int index,bool State); //index filter 类型,State是In/out状态 virtual RET_STATUS SetSID(int value); virtual RET_STATUS SetPhantom(int index, bool State);//index Phantom 类型,State是Load/Unload状态 virtual RET_STATUS SetDoseMeterPositon(int xvalue, int yvaule); virtual RET_STATUS SetDoorState(int type, int state);//type:0 leftdoor,1 rightdoor;state:0 lock,1 unlock virtual RET_STATUS SetFPDDoorState(int value); virtual RET_STATUS SetFPDPower(bool State); virtual RET_STATUS SetFPDRepair(bool State); virtual RET_STATUS XRAYState(bool state); virtual RET_STATUS ReplaceFilter(int index, bool State);//index filter 类型,State是Replace/Recover状态 };