DIOS.Dev.FPD2OtherDevice.hpp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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::Detector
  7. {
  8. //-----------------------------------------------------------------------------
  9. // AcqUnit
  10. //-----------------------------------------------------------------------------
  11. namespace nsDev = CCOS::Dev;
  12. class CFPDCommunicateWithOtherDevice : public IOLogicUnit
  13. {
  14. //属性Action
  15. typedef enum _AttrAction {
  16. ATTRACTION_GET,
  17. ATTRACTION_SET,
  18. ATTRACTION_ADD,
  19. ATTRACTION_DEL,
  20. ATTRACTION_UPDATE,
  21. ATTRACTION_DATA,
  22. ATTRACTION_MSG,
  23. ATTRACTION_MAX
  24. }ATTRACTION;
  25. #define MAX_STRING 1024
  26. string m_strPanelSN;
  27. unsigned int m_nCAL;
  28. unsigned int m_nCAM;
  29. unsigned int m_nHWcrop;
  30. unsigned int m_nPanelRotate;
  31. unsigned int m_nCollimatorAlign;
  32. unsigned int m_nWorkStation;
  33. float m_fCollimatorWidth;
  34. float m_fCollimatorLen;
  35. float m_fAPRms;
  36. float m_fLTEthreshold;
  37. BaseJsonDataObject<bool>* m_bLTEenable;
  38. BaseJsonDataObject<bool>* m_bXrayStatus; //0:No xray;1:Xray
  39. public:
  40. CFPDCommunicateWithOtherDevice(void);
  41. ~CFPDCommunicateWithOtherDevice(void);
  42. RET_STATUS GetCAL(unsigned int& nValue);
  43. RET_STATUS GetCAM(unsigned int& nValue);
  44. virtual RET_STATUS OnHWcrop(unsigned int nValue);
  45. virtual RET_STATUS OnPANEL_ROTATE(unsigned int nValue);
  46. virtual RET_STATUS OnCollimatorAlign(unsigned int nValue);
  47. virtual RET_STATUS OnCollimatorWidth(float fValue);
  48. virtual RET_STATUS OnCollimatorLen(float fValue);
  49. virtual RET_STATUS OnAPRms(float fValue); //
  50. virtual RET_STATUS OnWorkStation(unsigned int nValue);
  51. virtual RET_STATUS GetPanelSN(string& strValue);
  52. virtual RET_STATUS OnXrayStatus(bool bXRayStatus);
  53. protected:
  54. std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
  55. public:
  56. void SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
  57. //下面JS开头的在实现时需要register,注册的Key为函数名去掉JS开头
  58. RET_STATUS JSSetPanelSN(std::string in, std::string& out);
  59. RET_STATUS JSSetLTEthreshold(std::string in, std::string& out);
  60. RET_STATUS JSSetFPDCalibrationStatus(std::string in, std::string& out);
  61. RET_STATUS JSSetCalibrationHSWStatus(std::string in, std::string& out);
  62. RET_STATUS JSSendFPDError(std::string in, std::string& out);
  63. RET_STATUS JSClearFPDError(std::string in, std::string& out);
  64. RET_STATUS JSSendFPDWarn(std::string in, std::string& out);
  65. RET_STATUS JSGetIMGCropStatus(std::string& out);
  66. RET_STATUS JSGetFPDRotate(std::string& out);
  67. RET_STATUS JSGetCollimatorAlign(std::string& out);
  68. RET_STATUS JSGetCollimatorWidth(std::string& out);
  69. RET_STATUS JSGetCollimatorLength(std::string& out);
  70. RET_STATUS JSGetAPRms(std::string& out);
  71. RET_STATUS JSGetWorkStation(std::string& out);
  72. RET_STATUS JSLTEenable(std::string& out);
  73. RET_STATUS JSXrayStatus(std::string& out);
  74. };
  75. }