123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- #ifndef ABSTRACTACQEX_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "AbstractAcqExX64D.lib")
- #else
- #pragma comment(lib, "AbstractAcqExX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "AbstractAcqExD.lib")
- #else
- #pragma comment(lib, "AbstractAcqEx.lib")
- #endif
- #endif
- #endif
- #ifdef ABSTRACTACQEX_EXPORTS
- #define ABSTRACTACEX_API __declspec(dllexport)
- #else
- #define ABSTRACTACEX_API __declspec(dllimport)
- #endif
- #include "LogicDevice.h"
- #include "CommonLogicClient.h"
- #include <map>
- #include "DiosThread.h"
- #include "DIOSLogicDeviceStructure.h"
- class ABSTRACTACEX_API AbstractAcqEx : public LogicDevice
- {
-
- public:
- AbstractAcqEx(void);
- virtual ~AbstractAcqEx(void);
- SM_STATUS m_SMState;
- void *m_pData;
- void *m_pNotify;
- char m_chLog[512];
- //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
- HANDLE EvtDose;
- int m_ExecType;
- void SetErrorInfo(int errCode, char *pErrInfo);
- void SetWarningInfo(int warningCode, char *pWarningInfo);
- void LogInfo(string string);
- void LogWarn(string string);
- void LogError(string string);
- public:
- int WaitforNotify(DWORD Index);
- void InitState(const char* strState);
- bool StateAction(const char* strState);
- //bool StateGuard(char*, map<CommonLogicClient*, RES_SM> &objSM);
- bool StateNotify(char* strState, RES_SM ResSm);
- bool WaitDose();
- int Find(char *name, ResDataObject Res);
- int SetStateNotify(const char* strState);
- 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 ResetSMState();
- virtual RET_STATUS AddLogicDevice(string path);
- virtual RET_STATUS DelLogicDevice(string path);
- virtual RET_STATUS GetUnitAttribute(ResDataObject PARAM_OUT *pDeviceAttribute);
- virtual RET_STATUS SetApplicationMode(ResDataObject nApplicationMode);
- virtual RET_STATUS SetExamMode(ResDataObject nExamMode);
- virtual RET_STATUS SetImgID(ResDataObject nImgID);
-
- virtual RET_STATUS StartCalibration(ResDataObject nMode);
- virtual RET_STATUS GetRequestedDose(FLOAT &Dose);
- virtual RET_STATUS AcceptCurrImgage();
- virtual RET_STATUS RejectCurrImgage(void);
- virtual RET_STATUS AbortCalibration(void);
- virtual RET_STATUS FinishCalibration(void);
- virtual RET_STATUS SetCorrectionType(DWORD corrOptions);
- virtual RET_STATUS GetSEQResource(ResDataObject PARAM_OUT *pDeviceResource);
- //virtual RET_STATUS SeqPrep();
- //virtual RET_STATUS SeqPrepResult(CommonLogicClient* objSM, RES_SM SMResult);
- //virtual RET_STATUS SeqReady();
- //virtual RET_STATUS FramePrep();
- //virtual RET_STATUS FramePrepResult(CommonLogicClient* objSM, RES_SM SMResult);
- //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(CommonLogicClient* objSM, RES_SM SMResult);
- //virtual RET_STATUS FrameEnd();
- //virtual RET_STATUS FrameError();
- //virtual RET_STATUS FrameErrResult(CommonLogicClient* objSM, RES_SM SMResult);
- //virtual RET_STATUS SeqPost();
- //virtual RET_STATUS SeqPostResult(CommonLogicClient* objSM, RES_SM SMResult);
- //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_FrameErr();*/
- };
|