1.修改Glass的JobDataS的更新逻辑,在收到OnReceiveJob时,机器内未保存和管理Glass, 此时Glass在Arm上,应通过Arm来更新JobDataS;
已修改7个文件
63 ■■■■ 文件已修改
SourceCode/Bond/Servo/CArm.cpp 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CArm.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.cpp 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.cpp 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPortStatusReport.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Common.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/PageTransferLog.cpp 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CArm.cpp
@@ -102,4 +102,33 @@
        return 0;
    }
    int CArm::glassUpdateJobDataS(CJobDataS* pJobDataS)
    {
        ASSERT(pJobDataS);
        Lock();
        CGlass* pGlass = (CGlass*)m_slot[0].getContext();
        if (pGlass == nullptr) {
            Unlock();
            LOGE("<CArm>glassUpdateJobDataS失败,找不到对应的Glass");
            return -1;
        }
        CJobDataS* pSrcJs = pGlass->getJobDataS();
        if (pSrcJs->getCassetteSequenceNo() != pJobDataS->getCassetteSequenceNo()
            || pSrcJs->getJobSequenceNo() != pJobDataS->getJobSequenceNo()) {
            Unlock();
            LOGE("<CArm>glassUpdateJobDataS失败,CassetteNo不匹配([%d,%d] != [%d,%d])",
                pSrcJs->getCassetteSequenceNo(),
                pJobDataS->getCassetteSequenceNo(),
                pSrcJs->getJobSequenceNo(),
                pJobDataS->getJobSequenceNo());
            return -2;
        }
        pGlass->updateJobDataS(pJobDataS);
        Unlock();
        return 0;
    }
}
SourceCode/Bond/Servo/CArm.h
@@ -26,6 +26,10 @@
        // 调用tempFetchOut后,pGlass必须release一次
        int tempFetchOut(OUT CGlass*& pGlass);
        // 更新JobDataS
        // Equipment在onReceivedJob事件时调用
        int glassUpdateJobDataS(CJobDataS* pJobDataS);
    };
}
SourceCode/Bond/Servo/CEquipment.cpp
@@ -1439,17 +1439,15 @@
    {
        LOGI("<CEquipment-%s>onReceivedJob.", m_strName.c_str());
        // 可以在此更新JobDataS数据了
        CGlass* pGlass = getGlassFromSlot(port);
        if (pGlass == nullptr) {
            LOGE("<CEquipment-%s>onSentOutJob,没有找到对应的Glass(CassetteSequenceNo:%d, JobSequenceNo:%d, ID=%s),请检查数据,注意风险。",
                m_strName.c_str(), pJobDataS->getCassetteSequenceNo(), pJobDataS->getJobSequenceNo(),
                pJobDataS->getGlass1Id().c_str());
            return -1;
        }
        pGlass->updateJobDataS(pJobDataS);
        return 0;
        // 可以在此更新JobDataS数据了
        int nRet = ((CArm*)m_pArm)->glassUpdateJobDataS(pJobDataS);
        if (nRet < 0) {
            LOGE("<CEquipment-%s>onReceivedJob,更新JobDataS失败,glassUpdateJobDataS返回%d",
                m_strName.c_str(), nRet);
        }
        return nRet;
    }
    int CEquipment::decodeSentOutJobReport(CStep* pStep, int port, const char* pszData, size_t size)
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -345,6 +345,7 @@
                    [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
                        if (code == ROK && pszData != nullptr && size > 0) {
                            decodePortStatusReport((CStep*)pFrom, pszData, size);
                            return 0;
                        }
                        return -1;
                    });
SourceCode/Bond/Servo/CPortStatusReport.h
@@ -40,7 +40,7 @@
        short m_nJobExistenceSlot[12];        // 12 * 16 = 192 个slot是否存在glass
        short m_nLoadingCassetteType;        // 1: Actual Cassette 2 : Empty Cassette
        short m_nQTimeFlag;
        short m_nCassetteMappingState;        // 1: mapping use  2: mapping not use
        short m_nCassetteMappingState;        // 1: mapping use, 2: mapping not use
        short m_nCassetteStatus;
    };
}
SourceCode/Bond/Servo/Common.h
@@ -34,7 +34,7 @@
#define PAGE_GRPAH2_BACKGROUND_COLOR        RGB(255, 255, 255)
#define EQ_BOX_OFFLINE                        RGB(222, 222, 222)
#define EQ_BOX_ONLINE                        RGB(0, 176, 80)
#define EQ_BOX_OCCUPIED                     RGB(0, 204, 102)
#define EQ_BOX_OCCUPIED                     RGB(255, 127, 39)
#define EQ_BOX_FRAME1                        RGB(22, 22, 22)
#define EQ_BOX_FRAME2                        RGB(255, 127, 39)
#define CR_MSGBOX_BKGND                        RGB(7, 71, 166)
SourceCode/Bond/Servo/PageTransferLog.cpp
@@ -275,7 +275,12 @@
        return;
    }
    int nItem = m_listCtrl.InsertItem(0, _T(""));
    int nIndex = m_listCtrl.GetItemCount();
    if (nIndex < 0) {
        return;
    }
    int nItem = m_listCtrl.InsertItem(nIndex, _T(""));
    CString str;
    str.Format(_T("%d"), data.nRecordId);
    m_listCtrl.SetItemText(nItem, 1, str);