1.修改Glass的JobDataS的更新逻辑,在收到OnReceiveJob时,机器内未保存和管理Glass, 此时Glass在Arm上,应通过Arm来更新JobDataS;
| | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | // 调用tempFetchOut后,pGlass必须release一次 |
| | | int tempFetchOut(OUT CGlass*& pGlass); |
| | | |
| | | // 更新JobDataS |
| | | // Equipment在onReceivedJob事件时调用 |
| | | int glassUpdateJobDataS(CJobDataS* pJobDataS); |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | 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) |
| | |
| | | [&](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; |
| | | }); |
| | |
| | | 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; |
| | | }; |
| | | } |
| | |
| | | #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) |
| | |
| | | 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); |