From bdf0dc4cb183d3fec40e1d51b3bb94b7e53d0a55 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期日, 04 一月 2026 10:45:07 +0800
Subject: [PATCH] 1.修复报文字段差异风险: S1F3:项目用 getSubItemU4(0) 取 SVID;日志里有 U2 的情况,可能导致解析失败后回退成 SV=0。 S6F11:项目发送 DATAID(U4) + CEID(U4);日志样例里第一个字段是 U2,可能存在类型/字段定义不一致。
---
SourceCode/Bond/Servo/HsmsPassive.cpp | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index fc512d9..ae7ef22 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -1617,18 +1617,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 +2459,7 @@
}
// S6F11
-static unsigned int DATAID = 1;
+static unsigned short DATAID = 0;
int CHsmsPassive::requestEventReportSend(unsigned int CEID)
{
SERVO::CCollectionEvent* pEvent = getEvent(CEID);
@@ -2479,7 +2479,8 @@
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();
@@ -2523,6 +2524,21 @@
return requestEventReportSend("CarrierID_Readed");
}
+int CHsmsPassive::requestEventReportSend_CheckSlotMap()
+{
+ return requestEventReportSend("CheckSlotMap");
+}
+
+int CHsmsPassive::requestEventReportSend_SlotMapVerificationOK()
+{
+ return requestEventReportSend("SlotMapVerificationOK");
+}
+
+int CHsmsPassive::requestEventReportSend_SlotMapVerificationNG()
+{
+ return requestEventReportSend("SlotMapVerificationNG");
+}
+
int CHsmsPassive::requestEventReportSend_Port_Unload_Ready()
{
return requestEventReportSend("Port_Unload_Ready");
@@ -2531,6 +2547,11 @@
int CHsmsPassive::requestEventReportSend_Port_Load_Ready()
{
return requestEventReportSend("Port_Load_Ready");
+}
+
+int CHsmsPassive::requestEventReportSend_Port_Ready_To_Release()
+{
+ return requestEventReportSend("Port_Ready_To_Release");
}
int CHsmsPassive::requestEventReportSend_Port_Blocked()
@@ -2577,6 +2598,5 @@
{
return requestEventReportSend("OCR_PanelID_Read_OK");
}
-
--
Gitblit v1.9.3