Collimator.BasicMoulds.hpp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #pragma once
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5. #include "DIOS.Dev.MouldDefine.hpp"
  6. #include "Collimator.BasicMoulds.hpp"
  7. #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据
  8. namespace DIOS::Dev::Detail
  9. {
  10. namespace Collimator
  11. {
  12. static const char* DeviceDriverType = "{18FDF176-DECE-445F-A52C-A14BDD3AC2C1}";
  13. static const char* CollimatorUnitType = "{DD98BBEB-0850-4BE7-997B-8DDECA6BD654}";
  14. namespace AttrKey
  15. {
  16. static const char* XSIZE = "XSize";
  17. static const char* YSIZE = "YSize";
  18. static const char* FILTER = "Filter";
  19. static const char* SID = "SID";
  20. static const char* ANGLE = "Angle";
  21. static const char* MODE = "Mode";
  22. }
  23. namespace ActionKey
  24. {
  25. static const char* SetCollimatorSize = "SetCollimatorSize";
  26. static const char* SetCollimatorSID = "SetCollimatorSID";
  27. static const char* SetCollimatorFilter = "SetCollimatorFilter";
  28. static const char* SetCollimatorAngle = "SetCollimatorAngle";
  29. static const char* SetCollimatorMode = "SetCollimatorMode";
  30. static const char* SetTechParamsInfo = "SetTechParamsInfo";
  31. }
  32. //-----------------------------------------------------------------------------
  33. // XSIZEMould
  34. //-----------------------------------------------------------------------------
  35. class XSIZEMould : public IntMould
  36. {
  37. using super = IntMould;
  38. public:
  39. XSIZEMould(int initialvalue, int min, int max, int accuracy)
  40. :super(AttrKey::XSIZE, initialvalue, min, max, accuracy) {}
  41. ~XSIZEMould() {}
  42. static constexpr const char * Unit { "mm" };
  43. };
  44. //-----------------------------------------------------------------------------
  45. // YSIZEMould
  46. //-----------------------------------------------------------------------------
  47. class YSIZEMould : public IntMould
  48. {
  49. using super = IntMould;
  50. public:
  51. YSIZEMould(int initialvalue, int min, int max, int accuracy)
  52. :super(AttrKey::YSIZE, initialvalue, min, max, accuracy) {}
  53. ~YSIZEMould() {}
  54. static constexpr const char* Unit{ "mm" };
  55. };
  56. //-----------------------------------------------------------------------------
  57. // FILTERMould
  58. //-----------------------------------------------------------------------------
  59. class FILTERMould : public IntMould
  60. {
  61. using super = IntMould;
  62. public:
  63. FILTERMould(int initialvalue, int min, int max, int accuracy)
  64. :super(AttrKey::FILTER, initialvalue, min, max, accuracy) {}
  65. ~FILTERMould() {}
  66. };
  67. //-----------------------------------------------------------------------------
  68. // SIDMould
  69. //-----------------------------------------------------------------------------
  70. class SIDMould : public IntMould
  71. {
  72. using super = IntMould;
  73. public:
  74. SIDMould(int initialvalue, int min, int max, int accuracy)
  75. :super(AttrKey::SID, initialvalue, min, max, accuracy) {}
  76. ~SIDMould() {}
  77. static constexpr const char* Unit{ "mm" };
  78. };
  79. //-----------------------------------------------------------------------------
  80. // ANGLEMould
  81. //-----------------------------------------------------------------------------
  82. class ANGLEMould : public FloatMould
  83. {
  84. using super = FloatMould;
  85. public:
  86. ANGLEMould(float initialvalue, float min, float max, float accuracy)
  87. :super(AttrKey::ANGLE, initialvalue, min, max, accuracy) {}
  88. ~ANGLEMould() {}
  89. };
  90. //-----------------------------------------------------------------------------
  91. // MODEMould
  92. //-----------------------------------------------------------------------------
  93. class MODEMould : public IntMould
  94. {
  95. using super = IntMould;
  96. public:
  97. MODEMould(int initialvalue, int min, int max, int accuracy)
  98. :super(AttrKey::MODE, initialvalue, min, max, accuracy) {}
  99. ~MODEMould() {}
  100. };
  101. //-----------------------------------------------------------------------------
  102. // ConfigInfo
  103. //-----------------------------------------------------------------------------
  104. namespace ConfKey
  105. {
  106. static const char* DiosType = "Vender";
  107. static const char* DiosModel = "Model";
  108. static const char* DiosConfig = "DeviceConfig";
  109. static const char* DiosAttribute = "Attribute";
  110. static const char* DiosDescription = "Description";
  111. static const char* DiosSCFType = "SCFType";
  112. static const char* DiosSCFTCPIP = "TCPIP";
  113. static const char* DiosSCFCOM = "COM";
  114. static const char* DiosSCFIP = "ip";
  115. static const char* DiosSCFPort = "port";
  116. static const char* DiosSCFBaudrate = "baudrate";
  117. static const char* DiosSCFBytesize = "bytesize";
  118. static const char* DiosSCFParity = "parity";
  119. static const char* DiosSCFStopbits = "stopbits";
  120. static const char* DiosIsConnect = "IsConnect";
  121. }
  122. }
  123. }