SDC C-Project CF Review 프로그램
kojingeun
2023-07-14 f77e8008cac062596058fca2aeddda62b80bedbf
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
#pragma once
 
#include "AfmControlInfo.h"
 
class AFX_EXT_CLASS CAfmControl
{
public:
    CAfmControl(int nIndex);
    virtual ~CAfmControl(void);
    void Reset();
    void SetAFC2P(IAfmControl2Parent* pAFC2P)        { m_pAFC2P = pAFC2P; }
    const CAfmControlInfo* GetControlInfo() const    { return &m_ControlInfo; }
    
    // setter
    void SetIndex(int nIndex)    { m_nIndex = nIndex; }
 
    virtual int        Connect(const CAfmControlInfo& controlInfo) = 0;
    virtual void    Disconnect() = 0;
    
    // getter
    virtual BOOL    GetConnected() const;
    virtual BOOL    GetTracking(int& nTracking) const = 0;
    virtual BOOL    GetZoomIndex(int& nZoomIndex) const = 0;
    virtual BOOL    GetRecipeIndex(int& nRecipeIdnex, int& nZoomIndex) const = 0;
    virtual BOOL    GetRecipeName(CString& strRecipeName, int& nZoomIndex) const = 0;
    virtual BOOL    GetInFocus(BOOL* pRtCheck) = 0;
    virtual int        GetAFMHomePosition(bool &bHome) const = 0;
    virtual BOOL    GetCurPos(double& dPos) { return FALSE;}
 
    // setter
    virtual BOOL    SetTracking(int nTracking) = 0;
    virtual BOOL    SetZoomIndex(int nZoomIndex) = 0;
    virtual BOOL    SetRecipeIndex(int nRecipeIdnex, int nZoomIndex=-1) = 0;
    virtual BOOL    SetRecipeName(const CString& strRecipeName, int nZoomIndex=-1) = 0;
    virtual BOOL    SetSystemTime(SYSTEMTIME stCurrentTime);
 
    // command
    virtual int        RecipeJogSpeed(double dSpeed) = 0;
    virtual int        RecipeJogCommand(int nCmd) = 0;
    virtual int        RecipeTracking(int nTracking) = 0;
    virtual int        RecipeZoom(int nZoomIndex) = 0;
    virtual int        RecipeChange(int nRecipeIndex, int nZoomIndex) = 0;
    virtual int        RecipeChange(const CString& strRecipeName, int nZoomIndex) = 0;
 
    virtual BOOL    MoveToLimitPlus() = 0;
    virtual BOOL    MoveToLimitMinus() = 0;
    virtual int        MoveToHomePosition(int nHomePos = 0) = 0;
    virtual BOOL    MoveToBasePosition(int nZoomIndex) = 0;
    virtual BOOL    MoveToTargetPosition(double dPos) = 0;
 
    virtual int    JumpAF() = 0;
 
    // getter
    int GetIndex() const                 { return m_nIndex; }
    int    GetControlType() const             { return m_ControlInfo.GetControllerType(); }
    int    GetTotalRecipeCount() const     { return (int)m_vecAFMRecipeInfo.size(); }
    int    GetStatus()    const                 { return m_nStatus; }
    int    GetRecipeStatus() const         { return m_nRecipeStatus; }
 
    SAfmRecipeInfo*            GetAFMRecipeInfo(int nIndex);
    const SAfmRecipeInfo*    GetAFMRecipeInfo(int nIndex) const;
 
    virtual int        NetProcess_FC_SEND_ALIVE() = 0;
    virtual BOOL    IsSetTime() = 0;
    virtual    void    KillTime() = 0;
    virtual    CTime    GetLastAliveTime() = 0;
protected:
    int                        m_nIndex;
    IAfmControl2Parent*        m_pAFC2P;
    CAfmControlInfo            m_ControlInfo;
 
 
    BOOL                    m_bConnected;
    
    int                        m_nStatus;
    int                        m_nRecipeStatus;
    
    CString                    m_strRecipeName;
    int                        m_nRecipeIndex;
    int                        m_nZoomIndex;
    int                        m_nTracking;
 
    VectorAFMRecipeInfo        m_vecAFMRecipeInfo;
 
};