From 5907cf5775de374722d62648413fd46ca71cc396 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 17 一月 2025 10:34:19 +0800
Subject: [PATCH] 1.reply系列函数,修改为统一参数IMessage; 2.增加U2数据类型支持;

---
 SourceCode/Bond/Servo/HsmsPassive.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 5a62733..34738eb 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -177,10 +177,10 @@
 		LOGI("<HSMS>收到消息 S%dF%d", nStream, pHeader->function);
 		if (nStream == 1 && pHeader->function == 1) {
 			// S1F1
-			replyAreYouThere(pHeader->systemBytes);
+			replyAreYouThere(pMessage);
 		}
 		else if (nStream == 1 && pHeader->function == 13) {
-			replyEstablishCommunications(pHeader->systemBytes);
+			replyEstablishCommunications(pMessage);
 		}
 		else if (nStream == 2 && pHeader->function == 31) {
 			replyDatetime(pMessage);
@@ -330,14 +330,14 @@
 }
 
 // S1F2
-int CHsmsPassive::replyAreYouThere(unsigned int systemBytes)
+int CHsmsPassive::replyAreYouThere(IMessage* pRecv)
 {
 	if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
 		return ER_NOTSELECT;
 	}
 
 	IMessage* pMessage = NULL;
-	HSMS_Create1Message(pMessage, m_nSessionId, 1, 2, systemBytes);
+	HSMS_Create1Message(pMessage, m_nSessionId, 1, 2, pRecv->getHeader()->systemBytes);
 	ASSERT(pMessage);
 
 	ISECS2Item* pItem = pMessage->getBody();
@@ -351,14 +351,14 @@
 }
 
 // S1F14
-int CHsmsPassive::replyEstablishCommunications(unsigned int systemBytes)
+int CHsmsPassive::replyEstablishCommunications(IMessage* pRecv)
 {
 	if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
 		return ER_NOTSELECT;
 	}
 
 	IMessage* pMessage = NULL;
-	HSMS_Create1Message(pMessage, m_nSessionId, 1, 14, systemBytes);
+	HSMS_Create1Message(pMessage, m_nSessionId, 1, 14, pRecv->getHeader()->systemBytes);
 	ASSERT(pMessage);
 
 	ISECS2Item* pItem = pMessage->getBody();

--
Gitblit v1.9.3