From bfe14e41fa5b07771d78af4511ba18d706bc23cc Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 28 七月 2025 17:07:52 +0800
Subject: [PATCH] 1.Spooling Config功能EAP模拟测试;
---
SourceCode/Bond/Servo/CLoadPort.cpp | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
index f6afed4..ee5a8d1 100644
--- a/SourceCode/Bond/Servo/CLoadPort.cpp
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -884,8 +884,22 @@
if (nRet < 0) return nRet;
m_portStatusReport.copyEx(portStatusReport);
+
+ // 当port状态为InUse, 比较map
if (m_portStatusReport.getPortStatus() == PORT_INUSE) {
- this->sendCassetteCtrlCmd(5, nullptr, 0, 0, 0, nullptr, nullptr);
+ 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);
+ }
+ }
}
@@ -1112,6 +1126,18 @@
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;
+ }
+
/*
* 生成测试用的玻璃列表
*/
@@ -1127,14 +1153,13 @@
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);
--
Gitblit v1.9.3