#include "stdafx.h" #include "OEM.Mechanical.h" #include "CCOS.Dev.Generator.SINO.h" OemMechanical::OemMechanical(std::shared_ptr 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(SINODevice* pCtrlDev) { m_pGEN = pCtrlDev; } RET_STATUS OemMechanical::GetTomoResults(ResDataObject& resultAngle, ResDataObject& resultHeight) { RET_STATUS ret = RET_STATUS::RET_FAILED; ret = m_pGEN->GetTomoResults(resultAngle, resultHeight); return ret; } RET_STATUS OemMechanical::SetGrid(unsigned int GridType) { RET_STATUS ret = RET_STATUS::RET_FAILED; //ysj++v1的逻辑是首先获取,如果不同,再set,相同则不做动作。 ret = m_pGEN->SetGrid(GridType); return ret; } //这个接口,UI层 可能是叫setpress RET_STATUS OemMechanical::SetAutoTracking(unsigned int nAutoTracking) { RET_STATUS ret = RET_STATUS::RET_FAILED; ret = m_pGEN->SetAutoTracking(nAutoTracking); return ret; }