#pragma once #include #include #include "ResDataObject.h" #include "DIOS.Dev.IODevice.hpp" #include "DIOS.Dev.IODevice.Detail.hpp" namespace DIOS::Dev::Detail::MECH { //----------------------------------------------------------------------------- // Collimator //----------------------------------------------------------------------------- namespace nsDev = DIOS::Dev; static const char* MechanicalUnitType = "{A6C288B9-8C4F-3A6C-9C5F-12345A0F7284}"; class MechanicalDevice : public IODeviceDetail { using super = IODeviceDetail; void FireNotify(string key, unsigned int value); void FireNotify(string key, float value); void FireNotify(string key, string value); protected: std::shared_ptr m_EventCenter; unsigned int m_Grid; unsigned int m_Mammo_AE; unsigned int m_Mammo_FT; unsigned int m_Mammo_PressureState; unsigned int m_Mammo_CompPressureDEC; unsigned int m_Mammo_Depress; float m_Mammo_MechAngle; float m_Mammo_MechHeight; float m_Mammo_PressureValue; float m_Mammo_AGD; float m_Mammo_MAG; string m_Mammo_CompressPaddle; //压迫板信息(主要是尺寸,目前不确定) public: MechanicalDevice(std::shared_ptr EventCenter); ~MechanicalDevice(); virtual std::string GetGUID() const override; virtual bool Prepare(); virtual void Register(); nsDev::RET_STATUS JSSetGrid(std::string in, std::string& out); nsDev::RET_STATUS JSSetAutoTracking(std::string in, std::string& out); nsDev::RET_STATUS JSGetTomoResults(std::string in, std::string& out); nsDev::RET_STATUS JSGetGrid(std::string& out); nsDev::RET_STATUS JSGetMammo_AE(std::string& out); nsDev::RET_STATUS JSGetMammo_FT(std::string& out); nsDev::RET_STATUS JSGetMammo_PressureState(std::string& out); nsDev::RET_STATUS JSGetMammo_CompPressureDEC(std::string& out); nsDev::RET_STATUS JSGetMammo_Depress(std::string& out); nsDev::RET_STATUS JSGetMammo_MechAngle(std::string& out); nsDev::RET_STATUS JSGetMammo_MechHeight(std::string& out); nsDev::RET_STATUS JSGetMammo_PressureValue(std::string& out); nsDev::RET_STATUS JSGetMammo_AGD(std::string& out); nsDev::RET_STATUS JSGetMammo_MAG(std::string& out); nsDev::RET_STATUS JSGetMammo_CompressPaddle(std::string& out); virtual RET_STATUS GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight); virtual RET_STATUS SetGrid(unsigned int GridType); virtual RET_STATUS SetAutoTracking(unsigned int nAutoTracking); void UpdateGrid(unsigned int Value); void UpdateMammo_AE(unsigned int Value); void UpdateMammo_FT(unsigned int Value); void UpdateMammo_PressureState(unsigned int Value); void UpdateMammo_CompPressureDEC(unsigned int Value); void UpdateMammo_Depress(unsigned int Value); void UpdateMammo_MechAngle(float Value); void UpdateMammo_MechHeight(float Value); void UpdateMammo_PressureValue(float Value); void UpdateMammo_AGD(float Value); void UpdateMammo_MAG(float Value); void UpdateMammo_CompressPaddle(std::string Value); }; }