LAPTOP-SNT8I5JK\Boounion
2025-05-23 2b9a05133cb79683a940c9d8f53e0e7bc495009d
1.Port状态展示界面;
已添加2个文件
已修改7个文件
379 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CLoadPort.cpp 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPageGraph2.cpp 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPagePortStatus.cpp 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPagePortStatus.h 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.rc 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj.filters 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/resource.h 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -466,6 +466,41 @@
        return m_bAutoChangeEnable;
    }
    int CLoadPort::getPortStatus()
    {
        return m_portStatusReport.getPortStatus();
    }
    int CLoadPort::getCassetteSequenceNo()
    {
        return m_portStatusReport.getCassetteSequenceNo();
    }
    std::string& CLoadPort::getCassetteId()
    {
        return m_portStatusReport.getCassetteId();
    }
    int CLoadPort::getLoadingCassetteType()
    {
        return m_portStatusReport.getLoadingCassetteType();
    }
    int CLoadPort::getQTimeFlag()
    {
        return m_portStatusReport.getQTimeFlag();
    }
    int CLoadPort::getCassetteMappingState()
    {
        return m_portStatusReport.getCassetteMappingState();
    }
    int CLoadPort::getCassetteStatus()
    {
        return m_portStatusReport.getCassetteStatus();
    }
    /*
     1: Loading Port
     2: Unloading Port
@@ -616,6 +651,156 @@
        return strDescription;
    }
    /*
     1: Load Ready(Load Request)
     2: Loaded
     3: In Use (Load Complete)
     4: Unload Ready (Unload Request)
     5: Empty (Unload Complete)
     6: Blocked
 */
    std::string& CLoadPort::getPortStatusDescription(int portStatus, std::string& strDescription)
    {
        switch (portStatus) {
        case 1:
            strDescription = _T("Load Ready(Load Request)");
            break;
        case 2:
            strDescription = _T("Loaded");
            break;
        case 3:
            strDescription = _T("In Use(Load Complete)");
            break;
        case 4:
            strDescription = _T("Unload Ready(Unload Request)");
            break;
        case 5:
            strDescription = _T("Empty(Unload Complete)");
            break;
        case 6:
            strDescription = _T("Blocked");
            break;
        default:
            strDescription = _T("");
            break;
        }
        return strDescription;
    }
    /*
     1: G1 Cassette
     2: G2 Cassette
     3: G1 + G2 Cassette
     4: Empty Cassette
     *  Include this item only when cassette exists"
    */
    std::string& CLoadPort::getLoadingCassetteTypeDescription(int type, std::string& strDescription)
    {
        switch (type) {
        case 1:
            strDescription = _T("G1 Cassette)");
            break;
        case 2:
            strDescription = _T("G2 Cassette");
            break;
        case 3:
            strDescription = _T("G1+G2 Cassette)");
            break;
        case 4:
            strDescription = _T("Empty Cassette)");
            break;
        default:
            strDescription = _T("");
            break;
        }
        return strDescription;
    }
    /*
     1: Normal Un-loading
     2: Q-Time Over & Un-loading
    */
    std::string& CLoadPort::getQTimeFlagDescription(int flag, std::string& strDescription)
    {
        switch (flag) {
        case 1:
            strDescription = _T("Normal Un-loading");
            break;
        case 2:
            strDescription = _T("Q-Time Over & Un-loading");
            break;
        default:
            strDescription = _T("");
            break;
        }
        return strDescription;
    }
    /*
     1: mapping use
     2: mapping not use
    */
    std::string& CLoadPort::getCassetteMappingStateDescription(int state, std::string& strDescription)
    {
        switch (state) {
        case 1:
            strDescription = _T("Mapping use");
            break;
        case 2:
            strDescription = _T("Mapping not use");
            break;
        default:
            strDescription = _T("");
            break;
        }
        return strDescription;
    }
    /*
     1: No Cassette Exist
     2: Waiting for Cassette Data
     3: Waiting for Start Command
     4: Waiting for Processing
     5: In Processing
     6: Process Paused
     7: Process Completed
    */
    std::string& CLoadPort::getCassetteStatusDescription(int state, std::string& strDescription)
    {
        switch (state) {
        case 1:
            strDescription = _T("No Cassette Exist");
            break;
        case 2:
            strDescription = _T("Waiting for Cassette Data");
            break;
        case 3:
            strDescription = _T("Waiting for Start Command");
            break;
        case 4:
            strDescription = _T("Waiting for Processing");
            break;
        case 5:
            strDescription = _T("In Processing");
            break;
        case 6:
            strDescription = _T("Process Paused");
            break;
        case 7:
            strDescription = _T("Process Completed");
            break;
        default:
            strDescription = _T("");
            break;
        }
        return strDescription;
    }
    void CLoadPort::onReceiveLBData(const char* pszData, size_t size)
    {
        static int type[] = { STEP_ID_PORT1_TYPE_CHANGE, STEP_ID_PORT2_TYPE_CHANGE,
SourceCode/Bond/Servo/CLoadPort.h
@@ -41,6 +41,13 @@
        int getCessetteType();
        int getTransferMode();
        BOOL isAutoChange();
        int getPortStatus();
        int getCassetteSequenceNo();
        std::string& getCassetteId();
        int getLoadingCassetteType();
        int getQTimeFlag();
        int getCassetteMappingState();
        int getCassetteStatus();
        int testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix);
    public:
@@ -49,6 +56,11 @@
        static std::string& getPortCassetteTypeDescription(int casseteType, std::string& strDescription);
        static std::string& getPortTransferModeDescription(int mode, std::string& strDescription);
        static std::string& getEnableModeDescription(int mode, std::string& strDescription);
        static std::string& getPortStatusDescription(int portStatus, std::string& strDescription);
        static std::string& getLoadingCassetteTypeDescription(int type, std::string& strDescription);
        static std::string& getQTimeFlagDescription(int flag, std::string& strDescription);
        static std::string& getCassetteMappingStateDescription(int state, std::string& strDescription);
        static std::string& getCassetteStatusDescription(int state, std::string& strDescription);
    public:
        virtual int outputGlass(int port);
SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -10,6 +10,7 @@
#include "CEquipmentPage2.h"
#include "CEquipmentPage3.h"
#include "CPagePortProperty.h"
#include "CPagePortStatus.h"
#include "CPageCassetteCtrlCmd.h"
#include "CJobDataB.h"
@@ -128,10 +129,15 @@
        CHMPropertyDlg dlg(pEquipment->getName().c_str(), 600, 680);
        if (_strcmpi(pEquipment->getClassName(), "CLoadPort") == 0) {
            CPagePortProperty* pPage1 = new CPagePortProperty();
            pPage1->setLoadPort((SERVO::CLoadPort*)pEquipment);
            pPage1->Create(IDD_PAGE_PORT_PROPERTY);
            dlg.addPage(pPage1, "属性");
            CPagePortProperty* pPageA = new CPagePortProperty();
            pPageA->setLoadPort((SERVO::CLoadPort*)pEquipment);
            pPageA->Create(IDD_PAGE_PORT_PROPERTY);
            dlg.addPage(pPageA, "属性");
            CPagePortStatus* pPageB = new CPagePortStatus();
            pPageB->setLoadPort((SERVO::CLoadPort*)pEquipment);
            pPageB->Create(IDD_PAGE_PORT_STATUS);
            dlg.addPage(pPageB, "Status");
        }
        CEquipmentPage2* pPage2 = new CEquipmentPage2();
SourceCode/Bond/Servo/CPagePortStatus.cpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,127 @@
// CPagePortStatus.cpp: å®žçŽ°æ–‡ä»¶
//
#include "stdafx.h"
#include "Servo.h"
#include "CPagePortStatus.h"
#include "afxdialogex.h"
// CPagePortStatus å¯¹è¯æ¡†
IMPLEMENT_DYNAMIC(CPagePortStatus, CHMPropertyPage)
CPagePortStatus::CPagePortStatus(CWnd* pParent /*=nullptr*/)
    : CHMPropertyPage(IDD_PAGE_PORT_STATUS, pParent)
{
    m_pPort = nullptr;
}
CPagePortStatus::~CPagePortStatus()
{
}
void CPagePortStatus::DoDataExchange(CDataExchange* pDX)
{
    CHMPropertyPage::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CPagePortStatus, CHMPropertyPage)
    ON_WM_CTLCOLOR()
    ON_WM_DESTROY()
    ON_WM_SIZE()
END_MESSAGE_MAP()
// CPagePortStatus æ¶ˆæ¯å¤„理程序
void CPagePortStatus::setLoadPort(SERVO::CLoadPort* pPort)
{
    m_pPort = pPort;
}
BOOL CPagePortStatus::OnInitDialog()
{
    CHMPropertyPage::OnInitDialog();
    ASSERT(m_pPort);
    CComboBox* pComboBox;
    std::string strTemp;
    pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_PORT_STATUS);
    for (int i = 1; i <= 6; i++) {
        pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortStatusDescription(i, strTemp).c_str());
    }
    int portStatus = m_pPort->getPortStatus();
    if (1 <= portStatus && portStatus <= 6) {
        pComboBox->SetCurSel(portStatus - 1);
    }
    SetDlgItemInt(IDC_EDIT_CASSETTE_NO, m_pPort->getCassetteSequenceNo());
    SetDlgItemText(IDC_EDIT_CASSETTE_ID, m_pPort->getCassetteId().c_str());
    pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_LOADING_CASSETTE_TYPE);
    for (int i = 1; i <= 4; i++) {
        pComboBox->InsertString(i - 1, SERVO::CLoadPort::getLoadingCassetteTypeDescription(i, strTemp).c_str());
    }
    int loadingCassetteType = m_pPort->getLoadingCassetteType();
    if (1 <= loadingCassetteType && loadingCassetteType <= 4) {
        pComboBox->SetCurSel(loadingCassetteType - 1);
    }
    pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_QTIME_FLAG);
    for (int i = 1; i <= 2; i++) {
        pComboBox->InsertString(i - 1, SERVO::CLoadPort::getQTimeFlagDescription(i, strTemp).c_str());
    }
    int qTimeFlag = m_pPort->getQTimeFlag();
    if (1 <= qTimeFlag && qTimeFlag <= 2) {
        pComboBox->SetCurSel(qTimeFlag - 1);
    }
    pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_CASSETTE_MAPPING_STATE);
    for (int i = 1; i <= 2; i++) {
        pComboBox->InsertString(i - 1, SERVO::CLoadPort::getCassetteMappingStateDescription(i, strTemp).c_str());
    }
    int mappingState = m_pPort->getCassetteMappingState();
    if (1 <= mappingState && mappingState <= 2) {
        pComboBox->SetCurSel(mappingState - 1);
    }
    pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_CASSETTE_STATUS);
    for (int i = 1; i <= 7; i++) {
        pComboBox->InsertString(i - 1, SERVO::CLoadPort::getCassetteStatusDescription(i, strTemp).c_str());
    }
    int cassetteStatus = m_pPort->getCassetteStatus();
    if (1 <= cassetteStatus && cassetteStatus <= 7) {
        pComboBox->SetCurSel(cassetteStatus - 1);
    }
    return TRUE;  // return TRUE unless you set the focus to a control
                  // å¼‚常: OCX å±žæ€§é¡µåº”返回 FALSE
}
HBRUSH CPagePortStatus::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    HBRUSH hbr = CHMPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
    // TODO:  åœ¨æ­¤æ›´æ”¹ DC çš„任何特性
    // TODO:  å¦‚果默认的不是所需画笔,则返回另一个画笔
    return hbr;
}
void CPagePortStatus::OnDestroy()
{
    CHMPropertyPage::OnDestroy();
    // TODO: åœ¨æ­¤å¤„添加消息处理程序代码
}
void CPagePortStatus::OnSize(UINT nType, int cx, int cy)
{
    CHMPropertyPage::OnSize(nType, cx, cy);
    // TODO: åœ¨æ­¤å¤„添加消息处理程序代码
}
SourceCode/Bond/Servo/CPagePortStatus.h
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
#pragma once
#include "CHMPropertyPage.h"
// CPagePortStatus å¯¹è¯æ¡†
class CPagePortStatus : public CHMPropertyPage
{
    DECLARE_DYNAMIC(CPagePortStatus)
public:
    CPagePortStatus(CWnd* pParent = nullptr);   // æ ‡å‡†æž„造函数
    virtual ~CPagePortStatus();
public:
    void setLoadPort(SERVO::CLoadPort* pPort);
private:
    SERVO::CLoadPort* m_pPort;
// å¯¹è¯æ¡†æ•°æ®
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_PAGE_PORT_STATUS };
#endif
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV æ”¯æŒ
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
    afx_msg void OnDestroy();
    afx_msg void OnSize(UINT nType, int cx, int cy);
};
SourceCode/Bond/Servo/Servo.rc
Binary files differ
SourceCode/Bond/Servo/Servo.vcxproj
@@ -200,6 +200,7 @@
  <ItemGroup>
    <ClInclude Include="CEquipmentPage3.h" />
    <ClInclude Include="CGlassPool.h" />
    <ClInclude Include="CPagePortStatus.h" />
    <ClInclude Include="CPortStatusReport.h" />
    <ClInclude Include="MsgDlg.h" />
    <ClInclude Include="PageRecipe.h" />
@@ -290,6 +291,7 @@
    <ClInclude Include="SECSRuntimeManager.h" />
    <ClInclude Include="SecsTestDlg.h" />
    <ClInclude Include="Servo.h" />
    <ClInclude Include="ServoCommo.h" />
    <ClInclude Include="ServoDlg.h" />
    <ClInclude Include="ServoGraph.h" />
    <ClInclude Include="stdafx.h" />
@@ -301,6 +303,7 @@
  <ItemGroup>
    <ClCompile Include="CEquipmentPage3.cpp" />
    <ClCompile Include="CGlassPool.cpp" />
    <ClCompile Include="CPagePortStatus.cpp" />
    <ClCompile Include="CPortStatusReport.cpp" />
    <ClCompile Include="MsgDlg.cpp" />
    <ClCompile Include="PageRecipe.cpp" />
SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -107,6 +107,7 @@
    <ClCompile Include="CEquipmentPage3.cpp" />
    <ClCompile Include="CPortStatusReport.cpp" />
    <ClCompile Include="MsgDlg.cpp" />
    <ClCompile Include="CPagePortStatus.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="AlarmManager.h" />
@@ -212,6 +213,8 @@
    <ClInclude Include="CEquipmentPage3.h" />
    <ClInclude Include="CPortStatusReport.h" />
    <ClInclude Include="MsgDlg.h" />
    <ClInclude Include="CPagePortStatus.h" />
    <ClInclude Include="ServoCommo.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="Servo.rc" />
SourceCode/Bond/Servo/resource.h
Binary files differ