#include "StdAfx.h"
|
#include "CHReviewSetting/SystemInfo.h"
|
|
CSystemInfo::CSystemInfo(void)
|
{
|
Reset();
|
}
|
|
CSystemInfo::~CSystemInfo(void)
|
{
|
Reset();
|
}
|
|
void CSystemInfo::Reset()
|
{
|
m_bLongRun = FALSE;
|
m_nLongRunCount = 0;
|
|
m_nLineType = -1;
|
m_nMachineType = -1;
|
m_nMonitorPosition = 0;
|
|
m_bUseVisionAlign = TRUE;
|
m_dCollisionDistance = 0;
|
|
m_nAfmAliveCount = 3;
|
|
m_vecGantryInfo.clear();
|
}
|
|
CGantryInfo* CSystemInfo::GetGantryInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecGantryInfo.size()) return NULL;
|
|
return &(m_vecGantryInfo[nIndex]);
|
}
|
|
const CGantryInfo* CSystemInfo::GetGantryInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecGantryInfo.size()) return NULL;
|
|
return &(m_vecGantryInfo[nIndex]);
|
}
|
|
void CSystemInfo::SetInfo(const CSystemInfo& rhs)
|
{
|
m_nLineType = rhs.m_nLineType;
|
m_nMachineType = rhs.m_nMachineType;
|
m_nMonitorPosition = rhs.m_nMonitorPosition;
|
|
m_bLongRun = rhs.m_bLongRun;
|
m_nLongRunCount = rhs.m_nLongRunCount;
|
|
m_bUseVisionAlign = rhs.m_bUseVisionAlign;
|
m_dCollisionDistance = rhs.m_dCollisionDistance;
|
|
m_nAfmAliveCount = rhs.m_nAfmAliveCount;
|
|
m_vecGantryInfo = rhs.m_vecGantryInfo;
|
}
|
|
void CSystemInfo::GetInfo(CSystemInfo& rhs)
|
{
|
rhs.m_nLineType = m_nLineType;
|
rhs.m_nMachineType = m_nMachineType;
|
rhs.m_nMonitorPosition = m_nMonitorPosition;
|
|
rhs.m_bLongRun = m_bLongRun;
|
rhs.m_nLongRunCount = m_nLongRunCount;
|
|
rhs.m_bUseVisionAlign = m_bUseVisionAlign;
|
rhs.m_dCollisionDistance = m_dCollisionDistance;
|
|
rhs.m_nAfmAliveCount = m_nAfmAliveCount;
|
|
rhs.m_vecGantryInfo = m_vecGantryInfo;
|
}
|
|
int CSystemInfo::GetStandardGantryIndex() const
|
{
|
int i, nGantryCount, nStandardIdx = -1;
|
|
nGantryCount = (int)m_vecGantryInfo.size();
|
|
for(i = 0; i < nGantryCount; i++)
|
{
|
if(m_vecGantryInfo[i].m_bStandardGantry)
|
{
|
nStandardIdx = i;
|
break;
|
}
|
}
|
|
return nStandardIdx;
|
}
|