SDC C-Project CF Review 프로그램
LYW
2021-07-19 2bd50ead7f0b92fb9ed5b477b63dea8fbcf8217e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#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;
}