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/HsmsPassive.h                    |    2 +
 SourceCode/Bond/x64/Debug/CollectionEventList.txt      |    4 +
 SourceCode/Bond/Servo/HsmsPassive.cpp                  |    9 ++++
 SourceCode/Bond/Servo/CMaster.cpp                      |   20 +++++++++-
 SourceCode/Bond/Servo/CMaster.h                        |    2 +
 SourceCode/Bond/Servo/Model.cpp                        |    8 ++++
 SourceCode/Bond/x64/Debug/ReportList.txt               |    4 ++
 SourceCode/Bond/x64/Debug/VariableList.txt             |   59 +++++++++++++++--------------
 Document/Panel Bonder八零联合 SecsTest CheckList_v3.0.xlsx |    0 
 9 files changed, 77 insertions(+), 31 deletions(-)

diff --git "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx" "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
index 59056de..d84d8db 100644
--- "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
+++ "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
Binary files differ
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()
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 631ff24..5d09cd9 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -67,6 +67,8 @@
         ONCTROUNDEND            onCTRoundEnd;
         ONPJSTART               onPjStart;
         ONPJSTART               onPjEnd;
+        ONPJSTART               onPanelStart;
+        ONPJSTART               onPanelEnd;
     } MasterListener;
 
     class CMaster : public IResourceView
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index e96e8a8..8af37bb 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -1889,6 +1889,15 @@
 	return requestEventReportSend("PJ_End");
 }
 
+int CHsmsPassive::requestEventReportSend_Panel_Start()
+{
+	return requestEventReportSend("Panel_Start");
+}
+
+int CHsmsPassive::requestEventReportSend_Panel_End()
+{
+	return requestEventReportSend("Panel_End");
+}
 
 
 
diff --git a/SourceCode/Bond/Servo/HsmsPassive.h b/SourceCode/Bond/Servo/HsmsPassive.h
index f423b9e..5fd7fbc 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.h
+++ b/SourceCode/Bond/Servo/HsmsPassive.h
@@ -194,6 +194,8 @@
 	int requestEventReportSend_PJ_Queued();
 	int requestEventReportSend_PJ_Start();
 	int requestEventReportSend_PJ_End();
+	int requestEventReportSend_Panel_Start();
+	int requestEventReportSend_Panel_End();
 
 private:
 	void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index b71d072..fe3f448 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -395,6 +395,14 @@
 		m_hsmsPassive.setVariableValue("PJEndID", ((SERVO::CProcessJob*)pj)->id().c_str());
 		m_hsmsPassive.requestEventReportSend_PJ_End();
 	};
+	masterListener.onPanelStart = [&](void* pMaster, void* pj) {
+		m_hsmsPassive.setVariableValue("PanelStartID", ((SERVO::CGlass*)pj)->getID().c_str());
+		m_hsmsPassive.requestEventReportSend_Panel_Start();
+	};
+	masterListener.onPanelEnd = [&](void* pMaster, void* pj) {
+		m_hsmsPassive.setVariableValue("PanelEndID", ((SERVO::CGlass*)pj)->getID().c_str());
+		m_hsmsPassive.requestEventReportSend_Panel_End();
+	};
 	m_master.setListener(masterListener);
 	m_master.setContinuousTransferCount(m_configuration.getContinuousTransferCount());
 
diff --git a/SourceCode/Bond/x64/Debug/CollectionEventList.txt b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
index 7d2dd32..70ab593 100644
--- a/SourceCode/Bond/x64/Debug/CollectionEventList.txt
+++ b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
@@ -40,4 +40,6 @@
 50000,CarrierID_Readed,,(50000)
 50001,PJ_Queued,,(50001)
 50002,PJ_Start,,(50002)
-50002,PJ_End,,(50003)
+50003,PJ_End,,(50003)
+50004,Panel_Start,,(50004)
+50005,Panel_End,,(50005)
diff --git a/SourceCode/Bond/x64/Debug/ReportList.txt b/SourceCode/Bond/x64/Debug/ReportList.txt
index 5e9be61..b07803b 100644
--- a/SourceCode/Bond/x64/Debug/ReportList.txt
+++ b/SourceCode/Bond/x64/Debug/ReportList.txt
@@ -18,4 +18,8 @@
 50000,(5000)
 50001,(5003)
 50002,(5004)
+50003,(5005)
+50004,(5006)
+50005,(5007)
+
 
diff --git a/SourceCode/Bond/x64/Debug/VariableList.txt b/SourceCode/Bond/x64/Debug/VariableList.txt
index 84f4e7a..917d572 100644
--- a/SourceCode/Bond/x64/Debug/VariableList.txt
+++ b/SourceCode/Bond/x64/Debug/VariableList.txt
@@ -8,34 +8,37 @@
 701,PreviousProcessState,U1,
 800,EFEMPPExecName,A20,
 801,EQPPExecName,A20,
-2000,RbRAxisTorque,I2,机器人R轴扭矩
-2001,RbLAxisTorque,l2,机器人L轴扭矩
-2002,RbZAxisTorque,l2,机器人Z轴扭矩
-2003,RbTHAxisTorque,l2,机器人TH轴扭矩
-2004,RbXAxisTorque,l2,机器人X轴扭矩
-2005,AxisX111,l2,X111相机前移栽电机扭矩
-2006,AxisX112,l2,X112相机后移栽电机扭矩
-2007,AxisU113,l2,U113产品旋转电机扭矩
-2008,AxisX114,l2,X114产品左整列电机扭矩
-2009,AxisY121,l2,Y121产品右整列电机扭矩
-2010,AxisY122,l2,Y122产品前整列电机扭矩
-2011,AxisY123,l2,Y123产品后阵列电机扭矩
-2012,MainAir,U2,总进气压力值
-2013,MainVacuum,l2,总真空压力值
-2014,RbMainVacuum,l2,机器人真空值
-2015,LPMainVacuum,l2,LP真空值#D265
-2016,LPMainAir,U2,LP压空值
-2017,ALVacuum,l2,Aligner真空值
-2018,FFU1RPM,U2,FFU1转速
-2019,FFU2RPM,U2,FFU2转速
-2020,FFU3RPM,U2,FFU3转速
-2021,FFU4RPM,U2,FFU4转速
-2022,ESDValue,I2,静电检测值
-2023,OCREnable,U2,"OCR使能:O:开启 1:屏蔽"
-2024,CCDEnable,U2,"CCD使能:O:开启 1:屏蔽"
-2025,FFUParameter,U2,FFU设定值
-5000,CarrierID,A20,卡匣ID
+2000,RbRAxisTorque,I2,鏈哄櫒浜篟杞存壄鐭�
+2001,RbLAxisTorque,l2,鏈哄櫒浜篖杞存壄鐭�
+2002,RbZAxisTorque,l2,鏈哄櫒浜篫杞存壄鐭�
+2003,RbTHAxisTorque,l2,鏈哄櫒浜篢H杞存壄鐭�
+2004,RbXAxisTorque,l2,鏈哄櫒浜篨杞存壄鐭�
+2005,AxisX111,l2,X111鐩告満鍓嶇Щ鏍界數鏈烘壄鐭�
+2006,AxisX112,l2,X112鐩告満鍚庣Щ鏍界數鏈烘壄鐭�
+2007,AxisU113,l2,U113浜у搧鏃嬭浆鐢垫満鎵煩
+2008,AxisX114,l2,X114浜у搧宸︽暣鍒楃數鏈烘壄鐭�
+2009,AxisY121,l2,Y121浜у搧鍙虫暣鍒楃數鏈烘壄鐭�
+2010,AxisY122,l2,Y122浜у搧鍓嶆暣鍒楃數鏈烘壄鐭�
+2011,AxisY123,l2,Y123浜у搧鍚庨樀鍒楃數鏈烘壄鐭�
+2012,MainAir,U2,鎬昏繘姘斿帇鍔涘��
+2013,MainVacuum,l2,鎬荤湡绌哄帇鍔涘��
+2014,RbMainVacuum,l2,鏈哄櫒浜虹湡绌哄��
+2015,LPMainVacuum,l2,LP鐪熺┖鍊�#D265
+2016,LPMainAir,U2,LP鍘嬬┖鍊�
+2017,ALVacuum,l2,Aligner鐪熺┖鍊�
+2018,FFU1RPM,U2,FFU1杞��
+2019,FFU2RPM,U2,FFU2杞��
+2020,FFU3RPM,U2,FFU3杞��
+2021,FFU4RPM,U2,FFU4杞��
+2022,ESDValue,I2,闈欑數妫�娴嬪��
+2023,OCREnable,U2,"OCR浣胯兘锛歄:寮�鍚� 1锛氬睆钄�"
+2024,CCDEnable,U2,"CCD浣胯兘锛歄:寮�鍚� 1锛氬睆钄�"
+2025,FFUParameter,U2,FFU璁惧畾鍊�
+5000,CarrierID,A20,鍗″專ID
 5001,CJobSpace,U1,CJ Space
 5002,PJobSpace,U1,PJ Space
 5003,PJQueued,L,PJ Queued
-5004,PJStartID,A20,PJStartID
\ No newline at end of file
+5004,PJStartID,A20,PJStartID
+5005,PJEndID,A20,PJEndID
+5006,PanelStartID,A20,PanelStartID
+5007,PanelEndID,A20,PanelEndID
\ No newline at end of file

--
Gitblit v1.9.3