DIOS.Dev.MechanicalMoudle.hpp 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. void FireNotify(string key, unsigned int value);
  29. void FireNotify(string key, float value);
  30. protected:
  31. std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
  32. public:
  33. MechanicalDevice(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
  34. ~MechanicalDevice();
  35. virtual std::string GetGUID() const override;
  36. virtual bool Prepare();
  37. virtual void Register();
  38. RET_STATUS JSSetGrid(std::string in, std::string& out);
  39. RET_STATUS JSSetAutoTracking(std::string in, std::string& out);
  40. RET_STATUS JSGetTomoResults(std::string in, std::string& out);
  41. RET_STATUS JSGetGrid(std::string& out);
  42. RET_STATUS JSGetMammo_AE(std::string& out);
  43. RET_STATUS JSGetMammo_FT(std::string& out);
  44. RET_STATUS JSGetMammo_PressureState(std::string& out);
  45. RET_STATUS JSGetMammo_CompPressureDEC(std::string& out);
  46. RET_STATUS JSGetMammo_Depress(std::string& out);
  47. RET_STATUS JSGetMammo_MechAngle(std::string& out);
  48. RET_STATUS JSGetMammo_MechHeight(std::string& out);
  49. RET_STATUS JSGetMammo_PressureValue(std::string& out);
  50. RET_STATUS JSGetMammo_AGD(std::string& out);
  51. RET_STATUS JSGetMammo_MAG(std::string& out);
  52. virtual RET_STATUS GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight);
  53. virtual RET_STATUS SetGrid(unsigned int GridType);
  54. virtual RET_STATUS SetAutoTracking(unsigned int nAutoTracking);
  55. void UpdateGrid(unsigned int Value);
  56. void UpdateMammo_AE(unsigned int Value);
  57. void UpdateMammo_FT(unsigned int Value);
  58. void UpdateMammo_PressureState(unsigned int Value);
  59. void UpdateMammo_CompPressureDEC(unsigned int Value);
  60. void UpdateMammo_Depress(unsigned int Value);
  61. void UpdateMammo_MechAngle(float Value);
  62. void UpdateMammo_MechHeight(float Value);
  63. void UpdateMammo_PressureValue(float Value);
  64. void UpdateMammo_AGD(float Value);
  65. void UpdateMammo_MAG(float Value);
  66. };
  67. }