From 73f93ffcc9f292e6b17c51fbf4d7cda42356a16d Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 26 八月 2025 18:29:24 +0800
Subject: [PATCH] 1.Panel Start/Panel End事件上报功能实现,EAP模拟器接收数据并验证;

---
 SourceCode/Bond/Servo/CMaster.cpp |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index baf3806..38b6884 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -952,6 +952,11 @@
 									pGlass->getID().c_str());
 							}
 
+							// 这里上报Panel Start事件
+							if (m_listener.onPanelStart != nullptr) {
+								m_listener.onPanelStart(this, pGlass);
+							}
+
 							goto BATCH_PORT_GET;
 						}
 					}
@@ -1393,6 +1398,9 @@
 							LOGE("<Master>Glass(%s)从工艺列队到完成列队转移失败.",
 								pGlass->getID().c_str());
 						}
+						if (m_listener.onPanelEnd != nullptr) {
+							m_listener.onPanelEnd(this, pGlass);
+						}
 
 						// 检查PJ是否已经完成
 						CProcessJob* pJob = getGlassProcessJob((CGlass*)m_pActiveRobotTask->getContext());
@@ -1711,7 +1719,6 @@
 
 
 		// 模拟测试
-		/*
 		static int aaa = 0;
 		aaa++;
 		if (aaa % 30 == 0) {
@@ -1719,6 +1726,11 @@
 				CGlass* pGlass = m_queueGlasses.front();
 				pGlass->start();
 				glassFromQueueToInPorcess(pGlass);
+
+				// 这里上报Panel Start事件
+				if (m_listener.onPanelStart != nullptr) {
+					m_listener.onPanelStart(this, pGlass);
+				}
 			}
 		}
 
@@ -1728,6 +1740,10 @@
 				pGlass->complete();
 				glassFromInPorcessToComplete(pGlass);
 
+				// 这里上报Panel End事件
+				if (m_listener.onPanelEnd != nullptr) {
+					m_listener.onPanelEnd(this, pGlass);
+				}
 
 				CProcessJob* pJob = getGlassProcessJob(pGlass);
 				if (pJob != nullptr && checkAndUpdatePjComplete(pJob)) {
@@ -1739,7 +1755,7 @@
 				}
 			}
 		}
-		*/
+		
 	}
 
 	void CMaster::connectEquipments()

--
Gitblit v1.9.3