From e20a6e96aacc90667b7bed764a92f75993c20045 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 28 七月 2025 11:32:31 +0800
Subject: [PATCH] 1.暂存

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

diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 77e607c..55c616a 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -521,6 +521,9 @@
 		else if (nStream == 2 && pHeader->function == 41) {
 			replyCommand(pMessage);
 		}
+		else if (nStream == 2 && pHeader->function == 43) {
+			replyConfigureSpooling(pMessage);
+		}
 		else if (nStream == 5 && pHeader->function == 3) {
 			replyEanbleDisableAlarmReport(pMessage);
 		}
@@ -1067,6 +1070,74 @@
 	return 0;
 }
 
+// S2F43
+int CHsmsPassive::replyConfigureSpooling(IMessage* pRecv)
+{
+	if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
+		return ER_NOTSELECT;
+	}
+	ISECS2Item* pBody = pRecv->getBody();
+	if (pBody == nullptr || pBody->getType() != SITYPE::L) ER_PARAM_ERROR;
+
+	// 娓呯┖鎵�鏈�
+	if (pBody->getSubItemSize() == 0) {
+		m_spoolingConfig.clear();
+		goto MYREPLY;
+	}
+
+	// 渚濇閰嶇疆Stream
+	for (int i = 0; i < pBody->getSubItemSize(); i++) {
+		ISECS2Item* pStreamItem = pBody->getSubItem(i);
+		ASSERT(pStreamItem);
+		unsigned char STRID;
+		pStreamItem->getSubItemU1(0, STRID);
+		ISECS2Item* pFcnItem = pStreamItem->getSubItem(1);
+		for (int j = 0; j < pFcnItem->getSubItemSize(); j++) {
+
+		}
+	}
+
+
+
+
+	BOOL bCheckData = FALSE;
+	const char* pszCmdName;
+	std::vector<CommandParameter> params;
+	{
+		ISECS2Item* pItemParams, * pItemParam;
+		ISECS2Item* pItem = pRecv->getBody();
+		if (pItem->getSubItemSize() < 2) goto MYREPLY;
+		if (!pItem->getSubItemString(0, pszCmdName)) goto MYREPLY;
+		pItemParams = pItem->getSubItem(1);
+		if (pItemParams == nullptr || pItemParams->getType() != SITYPE::L) goto MYREPLY;
+		for (int i = 0; i < pItemParams->getSubItemSize(); i++) {
+			const char* pszParamName, * pszParamValue;
+			pItemParam = pItemParams->getSubItem(i);
+			if (pItemParam != nullptr
+				&& pItemParam->getSubItemString(0, pszParamName)
+				&& pItemParam->getSubItemString(1, pszParamValue)) {
+				CommandParameter cp;
+				strcpy_s(cp.szName, COMMAND_NAME_MAX, pszParamName);
+				strcpy_s(cp.szValue, COMMAND_VALUE_MAX, pszParamValue);
+				params.push_back(cp);
+			}
+		}
+		bCheckData = TRUE;
+	}
+
+
+	// 鍥炶皟鍒板簲鐢ㄥ眰
+	if (bCheckData) {
+		if (m_listener.onCommand != nullptr) {
+			m_listener.onCommand(this, pszCmdName, params);
+		}
+	}
+
+MYREPLY:
+	replyAck(2, 42, pRecv->getHeader()->systemBytes, BYTE(0), "ERACK");
+	return 0;
+}
+
 // S5F3
 int CHsmsPassive::replyEanbleDisableAlarmReport(IMessage* pRecv)
 {

--
Gitblit v1.9.3