DIOS.Dev.MechanicalMoudle.hpp 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include <string>
  3. #include <minwindef.h>
  4. #include "ResDataObject.h"
  5. #include "CCOS.Dev.IODevice.hpp"
  6. #include "CCOS.Dev.IODevice.Detail.hpp"
  7. namespace CCOS::Dev::Detail::Mechanical
  8. {
  9. //-----------------------------------------------------------------------------
  10. // Collimator
  11. //-----------------------------------------------------------------------------
  12. namespace nsDev = CCOS::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;
  19. unsigned int m_Mammo_FT;
  20. unsigned int m_Mammo_PressureState;
  21. unsigned int m_Mammo_CompPressureDEC;
  22. unsigned int m_Mammo_Depress;
  23. float m_Mammo_MechAngle;
  24. float m_Mammo_MechHeight;
  25. float m_Mammo_PressureValue;
  26. float m_Mammo_AGD;
  27. float m_Mammo_MAG;
  28. //压迫板信息(主要是尺寸,目前不确定)
  29. string m_Mammo_CompressPaddle;
  30. void FireNotify(string key, unsigned int value);
  31. void FireNotify(string key, float value);
  32. void FireNotify(string key, string value);
  33. protected:
  34. std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
  35. public:
  36. MechanicalDevice(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
  37. ~MechanicalDevice();
  38. virtual std::string GetGUID() const override;
  39. virtual bool Prepare();
  40. virtual void Register();
  41. RET_STATUS JSSetGrid(std::string in, std::string& out);
  42. RET_STATUS JSSetAutoTracking(std::string in, std::string& out);
  43. RET_STATUS JSGetTomoResults(std::string in, std::string& out);
  44. RET_STATUS JSGetGrid(std::string& out);
  45. RET_STATUS JSGetMammo_AE(std::string& out);
  46. RET_STATUS JSGetMammo_FT(std::string& out);
  47. RET_STATUS JSGetMammo_PressureState(std::string& out);
  48. RET_STATUS JSGetMammo_CompPressureDEC(std::string& out);
  49. RET_STATUS JSGetMammo_Depress(std::string& out);
  50. RET_STATUS JSGetMammo_MechAngle(std::string& out);
  51. RET_STATUS JSGetMammo_MechHeight(std::string& out);
  52. RET_STATUS JSGetMammo_PressureValue(std::string& out);
  53. RET_STATUS JSGetMammo_AGD(std::string& out);
  54. RET_STATUS JSGetMammo_MAG(std::string& out);
  55. RET_STATUS JSGetMammo_CompressPaddle(std::string& out);
  56. virtual RET_STATUS GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight);
  57. virtual RET_STATUS SetGrid(unsigned int GridType);
  58. virtual RET_STATUS SetAutoTracking(unsigned int nAutoTracking);
  59. void UpdateGrid(unsigned int Value);
  60. void UpdateMammo_AE(unsigned int Value);
  61. void UpdateMammo_FT(unsigned int Value);
  62. void UpdateMammo_PressureState(unsigned int Value);
  63. void UpdateMammo_CompPressureDEC(unsigned int Value);
  64. void UpdateMammo_Depress(unsigned int Value);
  65. void UpdateMammo_MechAngle(float Value);
  66. void UpdateMammo_MechHeight(float Value);
  67. void UpdateMammo_PressureValue(float Value);
  68. void UpdateMammo_AGD(float Value);
  69. void UpdateMammo_MAG(float Value);
  70. void UpdateMammo_CompressPaddle(std::string Value);
  71. };
  72. }