OEM.Mechanical.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #include "OEM.Mechanical.h"
  2. #include "CCOS.Dev.Generator.Demo.hpp"
  3. OemMechanical::OemMechanical(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter,
  4. int nGrid, unsigned int nAE, unsigned int nFT, unsigned int nPressureState, unsigned int nCompPressureDEC, unsigned int nDepress,
  5. float fMechAngle, float fMechHeight, float fPressureValue, float fAGD, float fMAG): super(EventCenter)
  6. {
  7. m_pGEN = nullptr;
  8. m_Grid = nGrid;
  9. m_Mammo_AE = nAE;
  10. m_Mammo_FT = nFT;
  11. m_Mammo_PressureState = nPressureState;
  12. m_Mammo_CompPressureDEC = nCompPressureDEC;
  13. m_Mammo_Depress = nDepress;
  14. m_Mammo_MechAngle = fMechAngle;
  15. m_Mammo_MechHeight = fMechHeight;
  16. m_Mammo_PressureValue = fPressureValue;
  17. m_Mammo_AGD = fAGD;
  18. m_Mammo_MAG = fMAG;
  19. }
  20. OemMechanical::~OemMechanical()
  21. {
  22. }
  23. bool OemMechanical::Prepare()
  24. {
  25. printf("OemMechanical::Prepare\n");
  26. Register();
  27. return true;
  28. }
  29. void OemMechanical::Register()
  30. {
  31. printf("OemMechanical::Register\n");
  32. super::Register();
  33. }
  34. void OemMechanical::SetCtrlDev(DemoDevice* pCtrlDev)
  35. {
  36. m_pGEN = pCtrlDev;
  37. }
  38. RET_STATUS OemMechanical::GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight)
  39. {
  40. RET_STATUS ret = RET_STATUS::RET_FAILED;
  41. ret = m_pGEN->GetTomoResults(resultAngle, resultHeight);
  42. return ret;
  43. }
  44. RET_STATUS OemMechanical::SetGrid(unsigned int GridType)
  45. {
  46. RET_STATUS ret = RET_STATUS::RET_FAILED;
  47. //ysj++v1的逻辑是首先获取,如果不同,再set,相同则不做动作。
  48. ret = m_pGEN->SetGrid(GridType);
  49. return ret;
  50. }
  51. //这个接口,UI层 可能是叫setpress
  52. RET_STATUS OemMechanical::SetAutoTracking(unsigned int nAutoTracking)
  53. {
  54. RET_STATUS ret = RET_STATUS::RET_FAILED;
  55. ret = m_pGEN->SetAutoTracking(nAutoTracking);
  56. return ret;
  57. }