CCOS.Dev.MechanicalMoudle.hpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #pragma once
  2. #include <string>
  3. #include "ResDataObject.h"
  4. #include "CCOS.Dev.IODevice.hpp"
  5. #include "CCOS.Dev.IODevice.Detail.hpp"
  6. namespace CCOS::Dev::Detail::Mechanical
  7. {
  8. //-----------------------------------------------------------------------------
  9. // Collimator
  10. //-----------------------------------------------------------------------------
  11. namespace nsDev = CCOS::Dev;
  12. static const char* MechanicalUnitType = "{A6C288B9-8C4F-3A6C-9C5F-12345A0F7284}";
  13. class MechanicalDevice : public IODeviceDetail
  14. {
  15. using super = IODeviceDetail;
  16. unsigned int m_Grid;
  17. unsigned int m_Mammo_AE;
  18. unsigned int m_Mammo_FT;
  19. unsigned int m_Mammo_PressureState;
  20. unsigned int m_Mammo_CompPressureDEC;
  21. unsigned int m_Mammo_Depress;
  22. float m_Mammo_MechAngle;
  23. float m_Mammo_MechHeight;
  24. float m_Mammo_PressureValue;
  25. float m_Mammo_AGD;
  26. float m_Mammo_MAG;
  27. void FireNotify(string key, unsigned int value);
  28. void FireNotify(string key, float value);
  29. protected:
  30. std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
  31. public:
  32. MechanicalDevice(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
  33. ~MechanicalDevice();
  34. virtual std::string GetGUID() const override;
  35. virtual bool Prepare();
  36. virtual void Register();
  37. RET_STATUS JSSetGrid(std::string in, std::string& out);
  38. RET_STATUS JSSetAutoTracking(std::string in, std::string& out);
  39. RET_STATUS JSGetTomoResults(std::string in, std::string& out);
  40. RET_STATUS JSGetGrid(std::string& out);
  41. RET_STATUS JSGetMammo_AE(std::string& out);
  42. RET_STATUS JSGetMammo_FT(std::string& out);
  43. RET_STATUS JSGetMammo_PressureState(std::string& out);
  44. RET_STATUS JSGetMammo_CompPressureDEC(std::string& out);
  45. RET_STATUS JSGetMammo_Depress(std::string& out);
  46. RET_STATUS JSGetMammo_MechAngle(std::string& out);
  47. RET_STATUS JSGetMammo_MechHeight(std::string& out);
  48. RET_STATUS JSGetMammo_PressureValue(std::string& out);
  49. RET_STATUS JSGetMammo_AGD(std::string& out);
  50. RET_STATUS JSGetMammo_MAG(std::string& out);
  51. virtual RET_STATUS GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight);
  52. virtual RET_STATUS SetGrid(unsigned int GridType);
  53. virtual RET_STATUS SetAutoTracking(unsigned int nAutoTracking);
  54. void UpdateGrid(unsigned int Value);
  55. void UpdateMammo_AE(unsigned int Value);
  56. void UpdateMammo_FT(unsigned int Value);
  57. void UpdateMammo_PressureState(unsigned int Value);
  58. void UpdateMammo_CompPressureDEC(unsigned int Value);
  59. void UpdateMammo_Depress(unsigned int Value);
  60. void UpdateMammo_MechAngle(float Value);
  61. void UpdateMammo_MechHeight(float Value);
  62. void UpdateMammo_PressureValue(float Value);
  63. void UpdateMammo_AGD(float Value);
  64. void UpdateMammo_MAG(float Value);
  65. };
  66. }