DIOS.Dev.COLLIMATORMould.hpp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #pragma once
  2. #include <string>
  3. #include <string>
  4. #include <memory>
  5. #include "DIOS.Dev.MouldDefine.hpp"
  6. namespace DIOS
  7. {
  8. namespace Dev
  9. {
  10. namespace COLLIMATOR
  11. {
  12. class ICollimatorControl
  13. {
  14. public:
  15. virtual ~ICollimatorControl() = default;
  16. virtual int SetCollimatorSize(unsigned short xsize, unsigned short ysize);
  17. virtual int SetCollimatorSID(unsigned short sid);
  18. virtual int SetCollimatorFilter(unsigned short pParams);
  19. virtual int SetCollimatorAngle(unsigned short pParams);
  20. virtual int SetCollimatorMode(unsigned short pParams);
  21. };
  22. //-----------------------------------------------------------------------------
  23. // CollimatorUnit
  24. //-----------------------------------------------------------------------------
  25. class XSIZEMould;
  26. class YSIZEMould;
  27. class FILTERMould;
  28. class SIDMould;
  29. class ANGLEMould;
  30. class MODEMould;
  31. class CollimatorUnit
  32. {
  33. ICollimatorControl* m_pCollimatorDevice;
  34. public:
  35. CollimatorUnit(ICollimatorControl* pCollimatorDevice);
  36. virtual ~CollimatorUnit();
  37. int SetCollimatorSize(std::string in, std::string & out);
  38. int SetCollimatorSID(std::string in, std::string & out);
  39. int SetCollimatorFilter(std::string in, std::string & out);
  40. int SetCollimatorAngle(std::string in, std::string & out);
  41. int SetCollimatorMode(std::string in, std::string & out);
  42. int SetTechParamsInfo(std::string in, std::string & out);
  43. public:
  44. std::unique_ptr<XSIZEMould> m_XSize;
  45. std::unique_ptr<YSIZEMould> m_YSize;
  46. std::unique_ptr<FILTERMould> m_Filter;
  47. std::unique_ptr<SIDMould> m_SID;
  48. std::unique_ptr<ANGLEMould> m_Angle;
  49. std::unique_ptr<MODEMould> m_Mode;
  50. };
  51. //-----------------------------------------------------------------------------
  52. // CollimatorMould
  53. //-----------------------------------------------------------------------------
  54. namespace AttrKey
  55. {
  56. static const char* XSIZE = "XSize";
  57. static const char* YSIZE = "YSize";
  58. static const char* FILTER = "Filter";
  59. static const char* SID = "SID";
  60. static const char* ANGLE = "Angle";
  61. static const char* MODE = "Mode";
  62. }
  63. namespace MOD = DIOS::Dev::Mould;
  64. class XSIZEMould :public MOD::IntMould
  65. {
  66. using super = MOD::IntMould;
  67. public:
  68. XSIZEMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  69. :super(pNotify, AttrKey::XSIZE, "mm", initialvalue, upper, lower, accuracy)
  70. {}
  71. ~XSIZEMould(){}
  72. };
  73. class YSIZEMould :public MOD::IntMould
  74. {
  75. using super = MOD::IntMould;
  76. public:
  77. YSIZEMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  78. :super(pNotify, AttrKey::YSIZE, "mm", initialvalue, upper, lower, accuracy)
  79. {}
  80. ~YSIZEMould(){}
  81. };
  82. class FILTERMould :public MOD::IntMould
  83. {
  84. using super = MOD::IntMould;
  85. public:
  86. FILTERMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  87. :super(pNotify, AttrKey::FILTER, "", initialvalue, upper, lower, accuracy)
  88. {}
  89. ~FILTERMould(){}
  90. };
  91. class SIDMould :public MOD::IntMould
  92. {
  93. using super = MOD::IntMould;
  94. public:
  95. SIDMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  96. :super(pNotify, AttrKey::SID, "mm", initialvalue, upper, lower, accuracy)
  97. {}
  98. ~SIDMould(){}
  99. };
  100. class ANGLEMould :public MOD::IntMould
  101. {
  102. using super = MOD::IntMould;
  103. public:
  104. ANGLEMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  105. :super(pNotify, AttrKey::ANGLE, "", initialvalue, upper, lower, accuracy)
  106. {}
  107. ~ANGLEMould(){}
  108. };
  109. class MODEMould :public MOD::IntMould
  110. {
  111. using super = MOD::IntMould;
  112. public:
  113. MODEMould(MOD::INofity* pNotify, int initialvalue, int upper, int lower, float accuracy)
  114. :super(pNotify, AttrKey::MODE, "", initialvalue, upper, lower, accuracy)
  115. {}
  116. ~MODEMould(){}
  117. };
  118. }
  119. }
  120. }