From 9a637512b223f44699f1b04953a1c627dc4c2d8e Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 17 一月 2025 11:53:09 +0800
Subject: [PATCH] 1.SESC模块,增加S7F19的回复(查询PPID列表),目前填充固定数据测试通讯,后期PPID列表数据从CC-Link中获取;
---
SourceCode/Bond/Servo/HsmsPassive.cpp | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 34738eb..0362da8 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -191,6 +191,9 @@
else if (nStream == 5 && pHeader->function == 3) {
replyEanbleDisableAlarmReport(pMessage);
}
+ else if (nStream == 7 && pHeader->function == 19) {
+ replyQueryPPIDList(pMessage);
+ }
else if (nStream == 10 && pHeader->function == 3) {
replyTerminalDisplay(pMessage);
}
@@ -476,6 +479,28 @@
return 0;
}
+// S7F19
+int CHsmsPassive::replyQueryPPIDList(IMessage* pRecv)
+{
+ if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
+ return ER_NOTSELECT;
+ }
+
+
+ IMessage* pMessage = NULL;
+ HSMS_Create1Message(pMessage, m_nSessionId, 7, 20, pRecv->getHeader()->systemBytes);
+ ASSERT(pMessage);
+
+ ISECS2Item* pItem = pMessage->getBody();
+ pItem->addItem("banana1", "PPID1");
+ pItem->addItem("banana2", "PPID2");
+ m_pPassive->sendMessage(pMessage);
+ LOGI("<HSMS>[SECS Msg SEND]S7F20 (SysByte=%u)", pMessage->getHeader()->systemBytes);
+ HSMS_Destroy1Message(pMessage);
+
+ return 0;
+}
+
// S10F3
int CHsmsPassive::replyTerminalDisplay(IMessage* pRecv)
{
--
Gitblit v1.9.3