From e3599db09ffb168e9755e800ea8d905efe63545f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 14 二月 2025 14:16:04 +0800
Subject: [PATCH] 1.文档
---
SourceCode/Bond/Servo/HsmsPassive.h | 3 +++
SourceCode/Bond/Servo/HsmsAction.h | 1 +
SourceCode/Bond/Servo/HsmsPassive.cpp | 39 +++++++++++++++++++++++++++++++++++++++
Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx | 0
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx | 0
SourceCode/Bond/Servo/ServoDlg.cpp | 8 ++++++++
6 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx
new file mode 100644
index 0000000..26977da
--- /dev/null
+++ b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx
Binary files differ
diff --git a/Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx b/Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx
new file mode 100644
index 0000000..66c9a74
--- /dev/null
+++ b/Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx
Binary files differ
diff --git a/SourceCode/Bond/Servo/HsmsAction.h b/SourceCode/Bond/Servo/HsmsAction.h
index e4f6910..5be2bbb 100644
--- a/SourceCode/Bond/Servo/HsmsAction.h
+++ b/SourceCode/Bond/Servo/HsmsAction.h
@@ -5,6 +5,7 @@
#define ACTION_IDLE 0
#define ACTION_HELLO 1 /* S1F1 */
#define ACTION_ALARM_REPORT 2 /* S5F1 */
+#define ACTION_EVENT_REPORT 3 /* S6F11 */
class CHsmsAction
{
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index 071ab51..094f4fd 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -125,6 +125,13 @@
}
+unsigned int CHsmsPassive::getCEID(int RPTID)
+{
+ auto iter = m_mapReportIdToCEID.find(RPTID);
+ if (iter != m_mapReportIdToCEID.end()) return iter->second;
+ return 0;
+}
+
void CHsmsPassive::deleteReport(unsigned int RPTID)
{
for (auto it = m_mapValueIdToPRTID.begin(); it != m_mapValueIdToPRTID.end(); ) {
@@ -947,4 +954,36 @@
return ER_NOERROR;
}
+// S6F11
+int CHsmsPassive::requestEventReportSend(unsigned int DATAID, unsigned int RPTID, const std::vector<std::string>& values)
+{
+ if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
+ return ER_NOTSELECT;
+ }
+
+ Lock();
+ CHsmsAction* pAction = new CHsmsAction(ACTION_EVENT_REPORT, TRUE, m_nActionTimeout);
+ m_listAction.push_back(pAction);
+ IMessage* pMessage = NULL;
+ HSMS_Create1Message(pMessage, m_nSessionId, 6 | REPLY, 11, ++m_nSystemByte);
+ ASSERT(pMessage);
+ ISECS2Item* pItem = pMessage->getBody();
+ pItem->addU4Item(DATAID, "DATAID");
+ pItem->addU4Item(getCEID(RPTID), "CEID");
+ ISECS2Item* pItemList1 = pItem->addItem();
+ ISECS2Item* pItemList2 = pItemList1->addItem();
+ pItemList2->addU4Item(RPTID, "RPTID");
+ ISECS2Item* pItemList3 = pItemList2->addItem();
+ for (auto item : values) {
+ pItemList3->addItem(item.c_str(), "V");
+ }
+ pAction->setSendMessage(pMessage);
+
+ SetEvent(m_hCimWorkEvent);
+ Unlock();
+
+ return ER_NOERROR;
+}
+
+
diff --git a/SourceCode/Bond/Servo/HsmsPassive.h b/SourceCode/Bond/Servo/HsmsPassive.h
index 616732e..44ce52c 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.h
+++ b/SourceCode/Bond/Servo/HsmsPassive.h
@@ -93,6 +93,8 @@
// 取消连接report
void unlinkEventReport(unsigned int CEID);
+ unsigned int getCEID(int RPTID);
+
// define Report
void defineReport(unsigned int VID, unsigned int RPTID);
@@ -113,6 +115,7 @@
/* request开头的函数为主动发送数据的函数 */
int requestAreYouThere();
int requestAlarmReport(int ALCD, int ALID, const char* ALTX);
+ int requestEventReportSend(unsigned int DATAID, unsigned int RPTID, const std::vector<std::string>& values);
private:
void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index a88bb3d..3f01d22 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -686,6 +686,14 @@
UpdateLogBtn();
LOGE("OnLogDlgHide");
+ unsigned int DATAID, RPTID;
+ DATAID = 111;
+ RPTID = 1001;
+ std::vector<std::string> v;
+ v.push_back("abc");
+ v.push_back("def");
+ theApp.m_model.m_hsmsPassive.requestEventReportSend(DATAID, RPTID, v);
+
return 0;
}
--
Gitblit v1.9.3