#pragma once #include #include "ResDataObject.h" #include "CCOS.Dev.IODevice.hpp" #include "CCOS.Dev.IODevice.Detail.hpp" namespace CCOS::Dev::Detail::Detector { //----------------------------------------------------------------------------- // AcqUnit //----------------------------------------------------------------------------- namespace nsDev = CCOS::Dev; class CFPDCommunicateWithOtherDevice : public IOLogicUnit { //属性Action typedef enum _AttrAction { ATTRACTION_GET, ATTRACTION_SET, ATTRACTION_ADD, ATTRACTION_DEL, ATTRACTION_UPDATE, ATTRACTION_DATA, ATTRACTION_MSG, ATTRACTION_MAX }ATTRACTION; #define MAX_STRING 1024 string m_strPanelSN; unsigned int m_nCAL; unsigned int m_nCAM; unsigned int m_nHWcrop; unsigned int m_nPanelRotate; unsigned int m_nCollimatorAlign; unsigned int m_nWorkStation; float m_fCollimatorWidth; float m_fCollimatorLen; float m_fAPRms; float m_fLTEthreshold; BaseJsonDataObject* m_bLTEenable; BaseJsonDataObject* m_bXrayStatus; //0:No xray;1:Xray public: CFPDCommunicateWithOtherDevice(void); ~CFPDCommunicateWithOtherDevice(void); RET_STATUS GetCAL(unsigned int& nValue); RET_STATUS GetCAM(unsigned int& nValue); virtual RET_STATUS OnHWcrop(unsigned int nValue); virtual RET_STATUS OnPANEL_ROTATE(unsigned int nValue); virtual RET_STATUS OnCollimatorAlign(unsigned int nValue); virtual RET_STATUS OnCollimatorWidth(float fValue); virtual RET_STATUS OnCollimatorLen(float fValue); virtual RET_STATUS OnAPRms(float fValue); // virtual RET_STATUS OnWorkStation(unsigned int nValue); virtual RET_STATUS GetPanelSN(string& strValue); virtual RET_STATUS OnXrayStatus(bool bXRayStatus); protected: std::shared_ptr m_EventCenter; public: void SetEventCenter(std::shared_ptr EventCenter); //下面JS开头的在实现时需要register,注册的Key为函数名去掉JS开头 RET_STATUS JSSetPanelSN(std::string in, std::string& out); RET_STATUS JSSetLTEthreshold(std::string in, std::string& out); RET_STATUS JSSetFPDCalibrationStatus(std::string in, std::string& out); RET_STATUS JSSetCalibrationHSWStatus(std::string in, std::string& out); RET_STATUS JSSendFPDError(std::string in, std::string& out); RET_STATUS JSClearFPDError(std::string in, std::string& out); RET_STATUS JSSendFPDWarn(std::string in, std::string& out); RET_STATUS JSGetIMGCropStatus(std::string& out); RET_STATUS JSGetFPDRotate(std::string& out); RET_STATUS JSGetCollimatorAlign(std::string& out); RET_STATUS JSGetCollimatorWidth(std::string& out); RET_STATUS JSGetCollimatorLength(std::string& out); RET_STATUS JSGetAPRms(std::string& out); RET_STATUS JSGetWorkStation(std::string& out); RET_STATUS JSLTEenable(std::string& out); RET_STATUS JSXrayStatus(std::string& out); }; }