SDC C-Project CF Review 프로그램
LYW
2021-07-29 bd13fa3f9396f1f681759f4623c55d5f91d74a9c
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#pragma once
 
#include <vector>
#include "CHCommonClasses/MacroFile.h"
 
enum AfmJogCmdType    { AfmJogCmd_Up=-1, AfmJogCmd_Down=1 };
 
struct SAfmRecipeInfo
{
    SAfmRecipeInfo() 
    {
        strRecipeName = _T("");
        nZoomCount = 0;
    }
    CString        strRecipeName;
    int            nZoomCount;
};
typedef std::vector<SAfmRecipeInfo>                        VectorAFMRecipeInfo;
typedef std::vector<SAfmRecipeInfo>::iterator            VectorAFMRecipeInfoIt;
typedef std::vector<SAfmRecipeInfo>::const_iterator        constVectorAFMRecipeInfoIt;
 
interface IAfmControl2Parent
{
    virtual void IAFC2P_DisplayMessage(int nIndex, const TCHAR* lpstrFormat, ...) = 0;
    virtual void IAFC2P_CurrentStatus(int nIndex, int nStatusCode) = 0;
    virtual void IAFC2P_RecipeChangeComplete(int nIndex, int nResultCode) = 0;
};
 
class CAfmControlInfo
{
public:
    CAfmControlInfo(int nIndex=0) : m_nIndex(nIndex)    { Reset(); }
    ~CAfmControlInfo(void)                        { Reset(); }
    void Reset()
    {
        m_strName            = _T("");
        m_nControllerType    = 0;
        m_strConnectionPort = _T("");
        m_dDefaultJogSpeed    = 1.0;
        m_dMaxJogSpeed        = 0.01;
        m_dMinJogSpeed        = 5.0;
        m_dCurrentJogSpeed    = 0;
    }
 
    BOOL LoadInfo(CMacroFile* pFile, const CString& strItemName)
    {
        if (pFile==NULL) return FALSE;
 
        CString strValue = _T("");
 
        strValue = strItemName + _T("_INDEX");
        pFile->GetItem(strValue, m_nIndex, 0);
 
        strValue = strItemName + _T("_NAME");
        pFile->GetItem(strValue, m_strName, _T(""));
 
        strValue = strItemName + _T("_CONTROL_TYPE");
        pFile->GetItem(strValue, m_nControllerType, 0);
 
        strValue = strItemName + _T("_CONNECT_PORT");
        pFile->GetItem(strValue, m_strConnectionPort, _T(""));
 
        strValue = strItemName + _T("_DEFAULT_JOG_SPPED");
        pFile->GetItem(strValue, m_dDefaultJogSpeed, 1.0);
 
        strValue = strItemName + _T("_MAX_JOG_SPEED");
        pFile->GetItem(strValue, m_dMaxJogSpeed, 0.01);
 
        strValue = strItemName + _T("_MIN_JOG_SPEED");
        pFile->GetItem(strValue, m_dMinJogSpeed, 5.0);
 
        strValue = strItemName + _T("_CURRENT_JOG_SPEED");
        pFile->GetItem(strValue, m_dCurrentJogSpeed, 0);
 
        return TRUE;
    }
 
    BOOL SaveInfo(CMacroFile* pFile, const CString& strItemName)
    {
        if (pFile==NULL) return FALSE;
 
        CString strValue = _T("");
 
        strValue = strItemName + _T("_INDEX");
        pFile->SetItem(strValue, m_nIndex);
 
        strValue = strItemName + _T("_NAME");
        pFile->SetItem(strValue, m_strName);
 
        strValue = strItemName + _T("_CONTROL_TYPE");
        pFile->SetItem(strValue, m_nControllerType);
 
        strValue = strItemName + _T("_CONNECT_PORT");
        pFile->SetItem(strValue, m_strConnectionPort);
 
        strValue = strItemName + _T("_DEFAULT_JOG_SPPED");
        pFile->SetItem(strValue, m_dDefaultJogSpeed);
 
        strValue = strItemName + _T("_MAX_JOG_SPEED");
        pFile->SetItem(strValue, m_dMaxJogSpeed);
 
        strValue = strItemName + _T("_MIN_JOG_SPEED");
        pFile->SetItem(strValue, m_dMinJogSpeed);
 
        strValue = strItemName + _T("_CURRENT_JOG_SPEED");
        pFile->SetItem(strValue, m_dCurrentJogSpeed);
 
        return TRUE;
    }
 
    int            GetIndex() const                            { return m_nIndex; }
    CString        GetName() const                                { return m_strName; }
    int            GetControllerType() const                    { return m_nControllerType; }
    CString        GetConnectionPort() const                    { return m_strConnectionPort; }
    double        GetDefaultJogSpeed() const                    { return m_dDefaultJogSpeed; }
    double        GetCurrentJogSpeed() const                    { return m_dCurrentJogSpeed; }
    double        GetMaxJogSpeed() const                        { return m_dMaxJogSpeed; }
    double        GetMinJogSpeed() const                        { return m_dMinJogSpeed; }
 
    void        SetIndex(int nIndex)                        { m_nIndex = nIndex; }
    void        SetName(const CString& strName)                { m_strName = strName; }
    void        SetControllerType(int nType)                { m_nControllerType = nType; }
    void        SetConnectionPort(const CString& strPort)    {  m_strConnectionPort = strPort; }
    void        SetDefaultJogSpeed(double dValue)            { m_dDefaultJogSpeed = dValue; }
    void        SetCurrentJogSpeed(double dValue)            { m_dCurrentJogSpeed = dValue; }
    void        SetMaxJogSpeed(double dValue)                { m_dMaxJogSpeed = dValue; }
    void        SetMinJogSpeed(double dValue)                { m_dMinJogSpeed = dValue; }
 
protected:
    int            m_nIndex;
    CString        m_strName;
 
    int            m_nControllerType;
    CString        m_strConnectionPort;
    double        m_dDefaultJogSpeed;
 
    double        m_dMaxJogSpeed;
    double        m_dMinJogSpeed;
    double        m_dCurrentJogSpeed;
};