123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- #pragma once
- #include <string>
- #include <algorithm>
- using namespace std;
- #include "DIOS.Dev.MouldDefine.hpp"
- #include "Collimator.BasicMoulds.hpp"
- #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据
- namespace DIOS::Dev::Detail
- {
- namespace Collimator
- {
- static const char* DeviceDriverType = "{18FDF176-DECE-445F-A52C-A14BDD3AC2C1}";
- static const char* CollimatorUnitType = "{DD98BBEB-0850-4BE7-997B-8DDECA6BD654}";
- namespace AttrKey
- {
- static const char* XSIZE = "XSize";
- static const char* YSIZE = "YSize";
- static const char* FILTER = "Filter";
- static const char* SID = "SID";
- static const char* ANGLE = "Angle";
- static const char* MODE = "Mode";
- }
- namespace ActionKey
- {
- static const char* SetCollimatorSize = "SetCollimatorSize";
- static const char* SetCollimatorSID = "SetCollimatorSID";
- static const char* SetCollimatorFilter = "SetCollimatorFilter";
- static const char* SetCollimatorAngle = "SetCollimatorAngle";
- static const char* SetCollimatorMode = "SetCollimatorMode";
- static const char* SetTechParamsInfo = "SetTechParamsInfo";
-
- }
- //-----------------------------------------------------------------------------
- // XSIZEMould
- //-----------------------------------------------------------------------------
- class XSIZEMould : public IntMould
- {
- using super = IntMould;
- public:
- XSIZEMould(int initialvalue, int min, int max, int accuracy)
- :super(AttrKey::XSIZE, initialvalue, min, max, accuracy) {}
-
- ~XSIZEMould() {}
- static constexpr const char * Unit { "mm" };
- };
- //-----------------------------------------------------------------------------
- // YSIZEMould
- //-----------------------------------------------------------------------------
- class YSIZEMould : public IntMould
- {
- using super = IntMould;
- public:
- YSIZEMould(int initialvalue, int min, int max, int accuracy)
- :super(AttrKey::YSIZE, initialvalue, min, max, accuracy) {}
- ~YSIZEMould() {}
- static constexpr const char* Unit{ "mm" };
- };
- //-----------------------------------------------------------------------------
- // FILTERMould
- //-----------------------------------------------------------------------------
- class FILTERMould : public IntMould
- {
- using super = IntMould;
- public:
- FILTERMould(int initialvalue, int min, int max, int accuracy)
- :super(AttrKey::FILTER, initialvalue, min, max, accuracy) {}
- ~FILTERMould() {}
- };
- //-----------------------------------------------------------------------------
- // SIDMould
- //-----------------------------------------------------------------------------
- class SIDMould : public IntMould
- {
- using super = IntMould;
- public:
- SIDMould(int initialvalue, int min, int max, int accuracy)
- :super(AttrKey::SID, initialvalue, min, max, accuracy) {}
- ~SIDMould() {}
- static constexpr const char* Unit{ "mm" };
- };
- //-----------------------------------------------------------------------------
- // ANGLEMould
- //-----------------------------------------------------------------------------
- class ANGLEMould : public FloatMould
- {
- using super = FloatMould;
- public:
- ANGLEMould(float initialvalue, float min, float max, float accuracy)
- :super(AttrKey::ANGLE, initialvalue, min, max, accuracy) {}
- ~ANGLEMould() {}
- };
- //-----------------------------------------------------------------------------
- // MODEMould
- //-----------------------------------------------------------------------------
- class MODEMould : public IntMould
- {
- using super = IntMould;
- public:
- MODEMould(int initialvalue, int min, int max, int accuracy)
- :super(AttrKey::MODE, initialvalue, min, max, accuracy) {}
- ~MODEMould() {}
- };
- //-----------------------------------------------------------------------------
- // 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";
- }
- }
- }
|