DIOS.Dev.Collimator.Mould.hpp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #pragma once
  2. #include <string>
  3. #include "DIOS.Dev.IODevice.hpp"
  4. #include "DIOS.Dev.IODevice.Detail.hpp"
  5. #include "Collimator.BasicMoulds.hpp"
  6. #include "DriverConfigInfo.hpp"
  7. namespace nsDetail = DIOS::Dev::Detail;
  8. #ifndef DIOSDEVCollimatorDEVICEMOULD_EXPORTS
  9. #ifdef _WIN64
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "DIOS.Dev.Collimator.Mould64D.lib")
  12. #else
  13. #pragma comment(lib, "DIOS.Dev.Collimator.Mould64.lib")
  14. #endif
  15. #else
  16. #ifdef _DEBUG
  17. #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib")
  18. #else
  19. #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib")
  20. #endif
  21. #endif
  22. #endif
  23. #ifdef DIOSDEVCollimatorDEVICEMOULD_EXPORTS
  24. #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllexport)
  25. #else
  26. #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllimport)
  27. #endif
  28. #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::ColliamtorMould”的客户端使用
  29. namespace DIOS::Dev::Detail::Collimator
  30. {
  31. //-----------------------------------------------------------------------------
  32. // CollimatorUnit
  33. //-----------------------------------------------------------------------------
  34. class _DIOSDEVCOLLIMATORDEVICEMOULD_API CollimatorUnit : public IOLogicUnit
  35. {
  36. public:
  37. CollimatorUnit() {};
  38. virtual ~CollimatorUnit() {};
  39. public:
  40. std::unique_ptr<XSIZEMould> m_XSize;
  41. std::unique_ptr<YSIZEMould> m_YSize;
  42. std::unique_ptr<FILTERMould> m_Filter;
  43. std::unique_ptr<SIDMould> m_SID;
  44. std::unique_ptr<ANGLEMould> m_Angle;
  45. std::unique_ptr<MODEMould> m_Mode;
  46. };
  47. //-----------------------------------------------------------------------------
  48. // ColliamtorMould
  49. //-----------------------------------------------------------------------------
  50. namespace nDev = DIOS::Dev;
  51. class _DIOSDEVCOLLIMATORDEVICEMOULD_API ColliamtorMould
  52. {
  53. public:
  54. ColliamtorMould();
  55. ~ColliamtorMould();
  56. protected:
  57. virtual void Register(Dispatch* Dispatch);
  58. private:
  59. //caoxue
  60. nDev::RET_STATUS JSGetCollimatorXSize(std::string& out);
  61. nDev::RET_STATUS JSGetCollimatorYSize(std::string& out);
  62. nDev::RET_STATUS JSSetCollimatorSize(std::string in, std::string& out);
  63. nDev::RET_STATUS JSGetCollimatorSID(std::string& out);
  64. nDev::RET_STATUS JSSetCollimatorSID(std::string in, std::string& out);
  65. nDev::RET_STATUS JSGetCollimatorFilter(std::string& out);
  66. nDev::RET_STATUS JSSetCollimatorFilter(std::string in, std::string& out);
  67. nDev::RET_STATUS JSGetCollimatorAngle(std::string& out);
  68. nDev::RET_STATUS JSSetCollimatorAngle(std::string in, std::string& out);
  69. nDev::RET_STATUS JSGetCollimatorMode(std::string& out);
  70. nDev::RET_STATUS JSSetCollimatorMode(std::string in, std::string& out);
  71. nDev::RET_STATUS JSSetTechParamsInfo(std::string in, std::string& out);
  72. protected:
  73. virtual int GetXSize();
  74. virtual int GetYSize();
  75. virtual nDev::RET_STATUS SetCollimatorSize(unsigned short xsize, unsigned short ysize) = 0;
  76. virtual int GetSID();
  77. virtual nDev::RET_STATUS SetCollimatorSID(unsigned short sid) = 0;
  78. virtual int GetFilter();
  79. virtual nDev::RET_STATUS SetCollimatorFilter(unsigned short pParams) = 0;
  80. virtual int GetAngle();
  81. virtual nDev::RET_STATUS SetCollimatorAngle(float pParams) = 0;
  82. virtual int GetMode();
  83. virtual nDev::RET_STATUS SetCollimatorMode(unsigned short pParams) = 0;
  84. protected:
  85. CollimatorUnit m_CollimatorUnit;
  86. };
  87. }
  88. namespace DIOS::Dev::Detail::Collimator
  89. {
  90. class _DIOSDEVCOLLIMATORDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
  91. {
  92. public:
  93. DriverMould ();
  94. ~DriverMould ();
  95. virtual std::string GetGUID () const;
  96. protected:
  97. std::list <ConfigInfo> m_ConfigInfo;
  98. };
  99. }