DIOS.Dev.MechanicalMoudle.hpp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #pragma once
  2. #include <string>
  3. #include <minwindef.h>
  4. #include "ResDataObject.h"
  5. #include "DIOS.Dev.IODevice.hpp"
  6. #include "DIOS.Dev.IODevice.Detail.hpp"
  7. namespace DIOS::Dev::Detail::Mechanical
  8. {
  9. //-----------------------------------------------------------------------------
  10. // Collimator
  11. //-----------------------------------------------------------------------------
  12. namespace nsDev = DIOS::Dev;
  13. static const char* MechanicalUnitType = "{A6C288B9-8C4F-3A6C-9C5F-12345A0F7284}";
  14. class MechanicalDevice : public IODeviceDetail
  15. {
  16. using super = IODeviceDetail;
  17. unsigned int m_Grid;
  18. unsigned int m_Mammo_AE;//AEC
  19. unsigned int m_Mammo_FT;//filter
  20. unsigned int m_Mammo_PressureState;//thickness
  21. unsigned int m_Mammo_CompPressureDEC;//自动释放设定
  22. unsigned int m_Mammo_Depress;
  23. float m_Mammo_MechAngle;
  24. float m_Mammo_MechSecAngle;
  25. float m_Mammo_MechHeight;
  26. float m_Mammo_PressureValue;//压迫值
  27. float m_Mammo_AGD;
  28. float m_Mammo_MAG;
  29. unsigned int m_InvalidPressureThreshold; //无效压力闯值
  30. //压迫板信息(主要是尺寸,目前不确定)
  31. string m_Mammo_CompressPaddle;
  32. void FireNotify(string key, unsigned int value);
  33. void FireNotify(string key, float value);
  34. void FireNotify(string key, string value);
  35. protected:
  36. std::shared_ptr <DIOS::Dev::IOEventCenter> m_EventCenter;
  37. public:
  38. MechanicalDevice(std::shared_ptr <DIOS::Dev::IOEventCenter> EventCenter);
  39. ~MechanicalDevice();
  40. virtual std::string GetGUID() const override;
  41. virtual bool Prepare();
  42. virtual void Register();
  43. RET_STATUS JSSetGrid(std::string in, std::string& out);
  44. RET_STATUS JSSetAutoTracking(std::string in, std::string& out);
  45. RET_STATUS JSGetTomoResults(std::string in, std::string& out);
  46. RET_STATUS JSGetGrid(std::string& out);
  47. RET_STATUS JSGetMammo_AE(std::string& out);
  48. RET_STATUS JSGetMammo_FT(std::string& out);
  49. RET_STATUS JSGetMammo_PressureState(std::string& out);
  50. RET_STATUS JSGetMammo_CompPressureDEC(std::string& out);
  51. RET_STATUS JSGetMammo_Depress(std::string& out);
  52. RET_STATUS JSGetMammo_MechAngle(std::string& out);
  53. RET_STATUS JSGetMammo_MechSecAngle(std::string& out);
  54. RET_STATUS JSGetMammo_MechHeight(std::string& out);
  55. RET_STATUS JSGetMammo_PressureValue(std::string& out);
  56. RET_STATUS JSGetMammo_AGD(std::string& out);
  57. RET_STATUS JSGetMammo_MAG(std::string& out);
  58. RET_STATUS JSGetMammo_CompressPaddle(std::string& out);
  59. virtual RET_STATUS GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight);
  60. virtual RET_STATUS SetGrid(unsigned int GridType);
  61. virtual RET_STATUS SetAutoTracking(unsigned int nAutoTracking);
  62. void UpdateGrid(unsigned int Value);
  63. void UpdateMammo_AE(unsigned int Value);
  64. void UpdateMammo_FT(unsigned int Value);
  65. void UpdateMammo_PressureState(unsigned int Value);
  66. void UpdateMammo_CompPressureDEC(unsigned int Value);
  67. void UpdateMammo_Depress(unsigned int Value);
  68. void UpdateMammo_MechAngle(float Value);
  69. void UpdateMammo_MechSecAngle(float Value);
  70. void UpdateMammo_MechHeight(float Value);
  71. void UpdateMammo_PressureValue(float Value);
  72. void UpdateMammo_AGD(float Value);
  73. void UpdateMammo_MAG(float Value);
  74. void UpdateMammo_CompressPaddle(std::string Value);
  75. void ReportMessageToDicom();
  76. void UpdateMammo_PressureErrorValue(unsigned int Value);
  77. unsigned int GetGrid();
  78. unsigned int GetMammo_AE();
  79. unsigned int GetMammo_FT();
  80. unsigned int GetMammo_PressureState();
  81. unsigned int GetMammo_CompPressureDEC();
  82. unsigned int GetMammo_Depress();
  83. float GetMammo_MechAngle();
  84. float GetMammo_MechHeight();
  85. float GetMammo_PressureValue();
  86. float GetMammo_AGD();
  87. float GetMammo_MAG();
  88. };
  89. }