CollimatorDevice.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "IODeviceWithSCF.tlh"
  3. #include "IODeviceWithSCF.tli"
  4. #include "DIOS.Dev.Collimator.Mould.hpp"
  5. namespace DIOS::Dev::Detail::SYNBOX
  6. {
  7. namespace nsCol = DIOS::Dev::Detail::Collimator;
  8. class CollimatorDevice : public nsCol::ColliamtorMould
  9. {
  10. public:
  11. using super = ColliamtorMould;
  12. CollimatorDevice(std::shared_ptr <IOEventCenter> center, nsSCF::SCF SCF);
  13. ~CollimatorDevice();
  14. public:
  15. void Register(Dispatch* Dispatch);
  16. void OnCallback();
  17. ResDataObject ResDYNConfig;
  18. int DealReceiveData(string sCmdID, const char* pData, int Datalen);
  19. protected:
  20. virtual RET_STATUS SetCollimatorMode(int pParams) override;
  21. virtual RET_STATUS SetCollimatorSize(float xproportion, float yproportion) override;
  22. virtual RET_STATUS SetCollimatorSID(int sid) override;
  23. virtual RET_STATUS SetCollimatorFilter(int pParams) override;
  24. virtual RET_STATUS SetCollimatorAngle(float pParams) override;
  25. virtual RET_STATUS SetCollimatorLight(int pParams) override;
  26. private:
  27. nsSCF::SCF m_SCF;
  28. std::shared_ptr <IOEventCenter> EventCenter;
  29. void FireNotify(std::string key, std::string context);
  30. bool SendCANBySCF(int cmdID, unsigned char* cmd, int cmdlen);
  31. };
  32. }