| | |
| | | if (nRet < 0) return nRet; |
| | | m_portStatusReport.copyEx(portStatusReport); |
| | | |
| | | |
| | | // 当port状态为InUse, 比较map |
| | | if (m_portStatusReport.getPortStatus() == PORT_INUSE) { |
| | | short scanMap = m_portStatusReport.getJobExistenceSlot(); |
| | | short downMap = getCassetteMap(); |
| | | if (scanMap == downMap) { |
| | | this->sendCassetteCtrlCmd(5, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | } |
| | | else { |
| | | this->sendCassetteCtrlCmd(10, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | |
| | | // 抛出到应用层做提示 |
| | | if (m_listener.onMapMismatch != nullptr) { |
| | | m_listener.onMapMismatch(this, scanMap, downMap); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | m_bAutoChangeEnable = bEnable; |
| | | } |
| | | |
| | | short CLoadPort::getCassetteMap() |
| | | { |
| | | short map = 0; |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | if (m_slot[i].getContext() == nullptr) continue; |
| | | map |= (1 << i); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | /* |
| | | * 生成测试用的玻璃列表 |
| | | */ |
| | |
| | | |
| | | |
| | | char szBuffer[64]; |
| | | for (int i = 0; i < 1; i++) { |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | |
| | | CJobDataS js; |
| | | js.setCassetteSequenceNo(getNextCassetteSequenceNo()); |
| | | js.setJobSequenceNo(m_slot[i].getNo()); |
| | | sprintf_s(szBuffer, 64, "%05d%05d", js.getCassetteSequenceNo(), js.getJobSequenceNo()); |
| | | //js.setGlass1Id(szBuffer); |
| | | js.setJobType(1); |
| | | js.setMaterialsType((int)type); |
| | | |