123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #pragma once
- #include <string>
- #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<bool>* m_bLTEenable;
- BaseJsonDataObject<bool>* 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 <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- void SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> 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);
- };
- }
|