From 3afd6812c6bcb156297a9000db44caf23ede568c Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期日, 04 一月 2026 17:44:42 +0800
Subject: [PATCH] 1.EV_SubEqpStart和EV_SubEqpEnd事件上报

---
 SourceCode/Bond/Servo/HsmsPassive.cpp |   53 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 2766b98..8b56b52 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -950,7 +950,8 @@
 		return -1;
 	}
 
-	std::wregex pattern(L"^\\d+,[^,]*,[^,]*,\\(\\d+(,\\d+)*\\).*");  // 鍖归厤浠ユ暟瀛�+閫楀彿寮�澶寸殑瀛楃涓�
+	// 鍏佽 Attached RPTID 涓虹┖锛�()
+	std::wregex pattern(L"^\\d+,[^,]*,[^,]*,\\(\\d*(,\\d+)*\\).*");  // 鍖归厤浠ユ暟瀛�+閫楀彿寮�澶寸殑瀛楃涓�
 	std::vector<SERVO::CCollectionEvent*> events;
 	int index, last;
 	CStringW strLine, strRPTIDs;
@@ -1617,18 +1618,18 @@
 	ASSERT(pMessage);
 
 	unsigned char SVU1 = 0;
-	unsigned int SVID = 0;
+	unsigned short SVID = 0;
 	ISECS2Item* pBody = pRecv->getBody();
 	if (pBody == nullptr || pBody->getType() != SITYPE::L) {
 		pMessage->getBody()->addU1Item(SVU1, "SV");
 		goto MYREPLY;
 	}
-	if (!pBody->getSubItemU4(0, SVID)) {
+	if (!pBody->getSubItemU2(0, SVID)) {
 		pMessage->getBody()->addU1Item(SVU1, "SV");
 		goto MYREPLY;
 	}
 
-	SERVO::CVariable* pVariable = getVariable(SVID);
+	SERVO::CVariable* pVariable = getVariable((int)SVID);
 	if (pVariable == nullptr) {
 		pMessage->getBody()->addU1Item(SVU1, "SV");
 		goto MYREPLY;
@@ -2459,7 +2460,7 @@
 }
 
 // S6F11
-static unsigned int DATAID = 1;
+static unsigned short DATAID = 0;
 int CHsmsPassive::requestEventReportSend(unsigned int CEID)
 {
 	SERVO::CCollectionEvent* pEvent = getEvent(CEID);
@@ -2468,9 +2469,6 @@
 	}
 
 	SERVO::CReport* pReport = pEvent->getFirstReport();
-	if (pReport == nullptr) {
-		return ER_UNLINK_EVENT_REPORT;
-	}
 
 
 	Lock();
@@ -2479,16 +2477,19 @@
 	HSMS_Create1Message(pMessage, m_nSessionId, 6 | REPLY, 11, ++m_nSystemByte);
 	ASSERT(pMessage);
 	ISECS2Item* pItem = pMessage->getBody();
-	pItem->addU4Item(++DATAID, "DATAID");
+	// pItem->addU2Item(++DATAID, "DATAID");		// 鏍规嵁鍒殑鏃ュ織鏄剧ずDATAID鎭掍负0锛屾墍浠ユ垜浠厛鐓т娇鐢�0
+	pItem->addU2Item(0, "DATAID");
 	pItem->addU4Item(CEID, "CEID");
-	ISECS2Item* pItemList1 = pItem->addItem();
-	ISECS2Item* pItemList2 = pItemList1->addItem();
-	pItemList2->addU4Item(pReport->getReportId(), "RPTID");
-	ISECS2Item* pItemList3 = pItemList2->addItem();
+	ISECS2Item* pItemList1 = pItem->addItem(); // L[n] reports
+	if (pReport != nullptr) {
+		ISECS2Item* pItemList2 = pItemList1->addItem();
+		pItemList2->addU4Item(pReport->getReportId(), "RPTID");
+		ISECS2Item* pItemList3 = pItemList2->addItem();
 
-	auto vars = pReport->getVariables();
-	for (auto var : vars) {
-		addVariableValueToItem(pItemList3, var);
+		auto vars = pReport->getVariables();
+		for (auto var : vars) {
+			addVariableValueToItem(pItemList3, var);
+		}
 	}
 	pAction->setSendMessage(pMessage);
 	if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
@@ -2598,4 +2599,24 @@
 	return requestEventReportSend("OCR_PanelID_Read_OK");
 }
 
+int CHsmsPassive::requestEventReportSend_LoadPortNotAssoc()
+{
+	return requestEventReportSend("LoadPortNotAssoc");
+}
+
+int CHsmsPassive::requestEventReportSend_ProcessDataReport()
+{
+	return requestEventReportSend("ProcessDataReport");
+}
+
+int CHsmsPassive::requestEventReportSend_SubEqpStart()
+{
+	return requestEventReportSend("SubEqpStart");
+}
+
+int CHsmsPassive::requestEventReportSend_SubEqpEnd()
+{
+	return requestEventReportSend("SubEqpEnd");
+}
+
 

--
Gitblit v1.9.3