#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; };