12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #include "stdafx.h"
- #include "OEM.Mechanical.h"
- #include "DIOS.Dev.Generator.Demo.hpp"
- OemMechanical::OemMechanical(std::shared_ptr <DIOS::Dev::IOEventCenter> EventCenter,
- int nGrid, unsigned int nAE, unsigned int nFT, unsigned int nPressureState, unsigned int nCompPressureDEC, unsigned int nDepress,
- float fMechAngle, float fMechHeight, float fPressureValue, float fAGD, float fMAG): super(EventCenter)
- {
- m_pGEN = nullptr;
- m_Grid = nGrid;
- m_Mammo_AE = nAE;
- m_Mammo_FT = nFT;
- m_Mammo_PressureState = nPressureState;
- m_Mammo_CompPressureDEC = nCompPressureDEC;
- m_Mammo_Depress = nDepress;
- m_Mammo_MechAngle = fMechAngle;
- m_Mammo_MechHeight = fMechHeight;
- m_Mammo_PressureValue = fPressureValue;
- m_Mammo_AGD = fAGD;
- m_Mammo_MAG = fMAG;
- }
- OemMechanical::~OemMechanical()
- {
- }
- bool OemMechanical::Prepare()
- {
- printf("OemMechanical::Prepare\n");
- Register();
- return true;
- }
- void OemMechanical::Register()
- {
- printf("OemMechanical::Register\n");
- super::Register();
- }
- void OemMechanical::SetCtrlDev(DemoDevice* pCtrlDev)
- {
- m_pGEN = pCtrlDev;
- }
- nsDev::RET_STATUS OemMechanical::GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight)
- {
- nsDev::RET_STATUS ret = nsDev::RET_STATUS::RET_FAILED;
-
- ret = m_pGEN->GetTomoResults(resultAngle, resultHeight);
- return ret;
- }
- nsDev::RET_STATUS OemMechanical::SetGrid(unsigned int GridType)
- {
- nsDev::RET_STATUS ret = nsDev::RET_STATUS::RET_FAILED;
-
- //ysj++v1的逻辑是首先获取,如果不同,再set,相同则不做动作。
- ret = m_pGEN->SetGrid(GridType);
- return ret;
- }
- //这个接口,UI层 可能是叫setpress
- nsDev::RET_STATUS OemMechanical::SetAutoTracking(unsigned int nAutoTracking)
- {
- nsDev::RET_STATUS ret = nsDev::RET_STATUS::RET_FAILED;
- ret = m_pGEN->SetAutoTracking(nAutoTracking);
- return ret;
- }
|