DIOS.Dev.CollimatorMoudle.hpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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::Collimator
  8. {
  9. //-----------------------------------------------------------------------------
  10. // Collimator
  11. //-----------------------------------------------------------------------------
  12. namespace nsDev = DIOS::Dev;
  13. static const char* CollimatorUnitType = "{566EC9F1-CE5A-4B31-9D2A-E9E80B4CA0CC}";
  14. class CollimatorDevice : public IODeviceDetail
  15. {
  16. using super = IODeviceDetail;
  17. void FireNotify(string key, WORD value);
  18. protected:
  19. std::shared_ptr <DIOS::Dev::IOEventCenter> m_EventCenter;
  20. WORD m_nXSize;
  21. WORD m_nYSize;
  22. WORD m_nFilter;
  23. WORD m_nSID;
  24. WORD m_nAngle;
  25. WORD m_nMode;
  26. public:
  27. CollimatorDevice(std::shared_ptr <DIOS::Dev::IOEventCenter> EventCenter);
  28. ~CollimatorDevice();
  29. virtual std::string GetGUID() const override;
  30. virtual bool Prepare();
  31. virtual void Register();
  32. nsDev::RET_STATUS JSSetStudyInfo(std::string in, std::string& out);
  33. nsDev::RET_STATUS JSSetTechParamsInfo(std::string in, std::string& out);
  34. nsDev::RET_STATUS JSSetCollimatorSize(std::string in, std::string& out);
  35. nsDev::RET_STATUS JSSetCollimatorSID(std::string in, std::string& out);
  36. nsDev::RET_STATUS JSSetCollimatorFilter(std::string in, std::string& out);
  37. nsDev::RET_STATUS JSSetCollimatorAngle(std::string in, std::string& out);
  38. nsDev::RET_STATUS JSSetCollimatorMode(std::string in, std::string& out);
  39. nsDev::RET_STATUS JSSetCollimatorLight(std::string in, std::string& out);
  40. nsDev::RET_STATUS JSGetCollimatorXSize(std::string& out);
  41. nsDev::RET_STATUS JSGetCollimatorYSize(std::string& out);
  42. nsDev::RET_STATUS JSGetCollimatorSID(std::string& out);
  43. nsDev::RET_STATUS JSGetCollimatorFilter(std::string& out);
  44. nsDev::RET_STATUS JSGetCollimatorAngle(std::string& out);
  45. nsDev::RET_STATUS JSGetCollimatorMode(std::string& out);
  46. //nsDev::RET_STATUS JSGetCollimatorLight(std::string& out);
  47. virtual RET_STATUS SetStudyInfo(ResDataObject& pParam);
  48. virtual RET_STATUS SetTechParamsInfo(ResDataObject& pParam);
  49. virtual RET_STATUS SetCollimatorSize(WORD xsize, WORD ysize);
  50. virtual RET_STATUS SetCollimatorSID(WORD sid);
  51. virtual RET_STATUS SetCollimatorFilter(WORD pParams);
  52. virtual RET_STATUS SetCollimatorAngle(WORD pParams);
  53. virtual RET_STATUS SetCollimatorMode(WORD pParams);
  54. virtual RET_STATUS SetCollimatorLight(WORD pParams);
  55. RET_STATUS UpdateCollimatorXSize(WORD Param);
  56. RET_STATUS UpdateCollimatorYSize(WORD Param);
  57. RET_STATUS UpdateCollimatorSID(WORD Param);
  58. RET_STATUS UpdateCollimatorAngle(WORD Param);
  59. RET_STATUS UpdateCollimatorFilter(WORD Param);
  60. RET_STATUS UpdateCollimatorMode(WORD Param);
  61. };
  62. }