#pragma once #include #include using namespace std; // //#include "TmplMould.tlh" //#include "TmplMould.tli" #include "DIOS.Dev.MouldDefine.hpp" #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据 namespace DIOS::Dev::Detail { namespace MECH { static const char* DeviceDriverType = "{18FDF176-DECE-445F-A52C-A14BDD3AC2C1}"; static const char* MechUnitType = "{0C99B70A-F788-48E1-9728-403BFF6DF982}"; static const char* MamoMechUnitType = "{620AE3B7-74A2-45B8-AE91-B3574CDD5391}"; namespace AttrKey { static const char* GRIDSTATE = "GridState"; static const char* GRIDTYPE = "GridType"; static const char* GRIDORIENTATION = "GridOrientation"; static const char* VIEWID = "ViewID"; static const char* TID = "DetectorToTableDistance";//TID static const char* SID = "DistanceSourcetoDetector";//SID static const char* ENTRANCE = "DistanceSourcetoEntrance";//ENTRANCE static const char* SOD = "DistanceSourcetoPatient";//SOD static const char* PATIENTSIZE = "PatientSize"; static const char* POSITIONNUMBER = "PositionNumber"; static const char* MAMMO_GRID = "GRID"; static const char* MAMMO_AE = "AE"; static const char* MAMMO_TUBEFILTER = "Filter"; static const char* MAMMO_THICKNESS = "Thickness"; static const char* MAMMO_CompPressureDEC = "CompPressureDEC"; static const char* MAMMO_DEPRESS = "Depress"; static const char* MAMMO_ANGLE = "MechanicalAngle"; static const char* MAMMO_HEIGHT = "MechanicalHeight"; static const char* MAMMO_PRESSVAL = "CompPressure"; static const char* MAMMO_AGD = "AGD"; static const char* MAMMO_MAG = "MAG"; typedef enum _Dios_Mech_GridType { Grid_No, Grid_1150, Universal, Grid_1800, Grid_1000, Grid_3000, Grid_1500 }MECH_GRIDTYPE; typedef enum _Dios_Mech_GridState { Grid_Noinformation, Grid_IN, Grid_IN_CHANGE, Grid_OUT, Grid_OUT_CHANGE }MECH_GRIDSTATE; typedef enum _Dios_Mech_GridOrientation { Grid_Vertical, Grid_Horizontal }MECH_GRIDORIENTATION; } namespace ActionKey { //病人信息相关 static const char* SetStudyInfo = "SetStudyInfo"; static const char* SetViewList = "SetViewList"; static const char* SelectViewInfo = "SelectViewInfo"; //技术参数主要是位置码,遮光器尺寸等信息 static const char* SetTechParamsInfo = "SetTechParamsInfo"; static const char* SetPositonNumber = "SetPositonNumber"; //机架机械控制 static const char* SetGridType = "SetGridType"; static const char* SetSID = "SetSID"; static const char* SetSOD = "SetSOD"; static const char* SetAutoTracking = "SetAutoTracking"; //获取tomo曝光中的位置信息 static const char* GetTomoResults = "GetTomoResults"; } class GRIDSTATEMould :public IntMould { using super = IntMould; public: GRIDSTATEMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::GRIDSTATE, initialvalue, lower, upper, accuracy) {} ~GRIDSTATEMould() {} }; class GRIDTYPEMould :public IntMould { using super = IntMould; public: GRIDTYPEMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::GRIDTYPE, initialvalue, lower, upper, accuracy) {} ~GRIDTYPEMould() {} }; class GRIDORIENTATIONMould :public IntMould { using super = IntMould; public: GRIDORIENTATIONMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::GRIDORIENTATION, initialvalue, lower, upper, accuracy) {} ~GRIDORIENTATIONMould() {} }; class VIEWIDMould :public IntMould { using super = IntMould; public: VIEWIDMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::VIEWID, initialvalue, lower, upper, accuracy) {} ~VIEWIDMould() {} }; class TIDMould :public IntMould { using super = IntMould; public: TIDMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::TID, initialvalue, lower, upper, accuracy) {} ~TIDMould() {} static constexpr const char* Unit{ "mm" }; std::string GetDescription() { ResDataObject temp, result; temp.add(ValKey::UPPERLIMIT, m_LimitMax); temp.add(ValKey::LOWERLIMIT, m_LimitMin); temp.add(ValKey::ACCURACY, m_Accuracy); temp.add(ValKey::UNIT, Unit); result.add(Key.c_str(), temp); return result.encode(); } }; class SIDMould :public IntMould { using super = IntMould; public: SIDMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::SID, initialvalue, lower, upper, accuracy) {} ~SIDMould() {} static constexpr const char* Unit{ "mm" }; std::string GetDescription() { ResDataObject temp, result; temp.add(ValKey::UPPERLIMIT, m_LimitMax); temp.add(ValKey::LOWERLIMIT, m_LimitMin); temp.add(ValKey::ACCURACY, m_Accuracy); temp.add(ValKey::UNIT, Unit); result.add(Key.c_str(), temp); return result.encode(); } }; class ENTRANCEMould :public IntMould { using super = IntMould; public: ENTRANCEMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::ENTRANCE, initialvalue, lower, upper, accuracy) {} ~ENTRANCEMould() {} static constexpr const char* Unit{ "mm" }; std::string GetDescription() { ResDataObject temp, result; temp.add(ValKey::UPPERLIMIT, m_LimitMax); temp.add(ValKey::LOWERLIMIT, m_LimitMin); temp.add(ValKey::ACCURACY, m_Accuracy); temp.add(ValKey::UNIT, Unit); result.add(Key.c_str(), temp); return result.encode(); } }; class SODMould :public IntMould { using super = IntMould; public: SODMould( int initialvalue, int lower, int upper, float accuracy) :super( AttrKey::SOD, initialvalue, lower, upper, accuracy) {} ~SODMould() {} static constexpr const char* Unit{ "mm" }; std::string GetDescription() { ResDataObject temp, result; temp.add(ValKey::UPPERLIMIT, m_LimitMax); temp.add(ValKey::LOWERLIMIT, m_LimitMin); temp.add(ValKey::ACCURACY, m_Accuracy); temp.add(ValKey::UNIT, Unit); result.add(Key.c_str(), temp); return result.encode(); } }; class PATIENTSIZEMould :public IntMould { using super = IntMould; public: PATIENTSIZEMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::PATIENTSIZE, initialvalue, lower, upper, accuracy) {} ~PATIENTSIZEMould() {} }; class POSITIONNUMBERMould :public IntMould { using super = IntMould; public: POSITIONNUMBERMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::POSITIONNUMBER, initialvalue, lower, upper, accuracy) {} ~POSITIONNUMBERMould() {} }; class MAMMOGRIDMould :public IntMould { using super = IntMould; public: MAMMOGRIDMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_GRID, initialvalue, lower, upper, accuracy) {} ~MAMMOGRIDMould() {} }; class MAMMOAEMould :public IntMould { using super = IntMould; public: MAMMOAEMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_AE, initialvalue, lower, upper, accuracy) {} ~MAMMOAEMould() {} }; class MAMMOTHICKNESSMould :public IntMould { using super = IntMould; public: MAMMOTHICKNESSMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_THICKNESS, initialvalue, lower, upper, accuracy) {} ~MAMMOTHICKNESSMould() {} }; class MAMMOTUBEFILTERMould :public IntMould { using super = IntMould; public: MAMMOTUBEFILTERMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_TUBEFILTER, initialvalue, lower, upper, accuracy) {} ~MAMMOTUBEFILTERMould() {} }; class MAMMOPRESSDECMould :public IntMould { using super = IntMould; public: MAMMOPRESSDECMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_CompPressureDEC, initialvalue, lower, upper, accuracy) {} ~MAMMOPRESSDECMould() {} }; class MAMMODEPRESSMould :public IntMould { using super = IntMould; public: MAMMODEPRESSMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::MAMMO_DEPRESS, initialvalue, lower, upper, accuracy) {} ~MAMMODEPRESSMould() {} }; class MAMMOANGLEMould :public FloatMould { using super = FloatMould; public: MAMMOANGLEMould(float initialvalue, float lower, float upper, float accuracy) :super(AttrKey::MAMMO_ANGLE, initialvalue, lower, upper, accuracy) {} ~MAMMOANGLEMould() {} }; class MAMMOHEIGHTMould :public FloatMould { using super = FloatMould; public: MAMMOHEIGHTMould(float initialvalue, float lower, float upper, float accuracy) :super(AttrKey::MAMMO_HEIGHT, initialvalue, lower, upper, accuracy) {} ~MAMMOHEIGHTMould() {} }; class MAMMOPRESSVALMould :public FloatMould { using super = FloatMould; public: MAMMOPRESSVALMould(float initialvalue, float lower, float upper, float accuracy) :super(AttrKey::MAMMO_PRESSVAL, initialvalue, lower, upper, accuracy) {} ~MAMMOPRESSVALMould() {} }; class MAMMOAGDMould :public FloatMould { using super = FloatMould; public: MAMMOAGDMould(float initialvalue, float lower, float upper, float accuracy) :super(AttrKey::MAMMO_AGD, initialvalue, lower, upper, accuracy) {} ~MAMMOAGDMould() {} }; class MAMMOMAGMould :public FloatMould { using super = FloatMould; public: MAMMOMAGMould(float initialvalue, float lower, float upper, float accuracy) :super(AttrKey::MAMMO_MAG, initialvalue, lower, upper, accuracy) {} ~MAMMOMAGMould() {} }; //----------------------------------------------------------------------------- // ConfigInfo //----------------------------------------------------------------------------- namespace ConfKey { static const char* DiosType = "Vender"; static const char* DiosModel = "Model"; static const char* DiosConfig = "DeviceConfig"; static const char* DiosAttribute = "Attribute"; static const char* DiosDescription = "Description"; static const char* DiosSCFType = "SCFType"; static const char* DiosSCFTCPIP = "TCPIP"; static const char* DiosSCFCOM = "COM"; static const char* DiosSCFIP = "ip"; static const char* DiosSCFPort = "port"; static const char* DiosSCFBaudrate = "baudrate"; static const char* DiosSCFBytesize = "bytesize"; static const char* DiosSCFParity = "parity"; static const char* DiosSCFStopbits = "stopbits"; static const char* DiosIsConnect = "IsConnect"; } } }