From 84925ada39fdef3f5bd7266005010103897713a6 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 11 七月 2025 17:49:15 +0800
Subject: [PATCH] 1.EAP模拟器,启用或禁用警告上报功能实现和模拟测试; 2.Master端,收到EAP的启用或警告消息上报消息后,保存相关配置,如后续机器发生警告,根据配置决定是否上报警告消息;

---
 SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
index ef31282..6dca163 100644
--- a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
+++ b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -79,6 +79,7 @@
 	ON_BN_CLICKED(IDC_BUTTON_DATETIME_SYNC, &CEAPSimulatorDlg::OnBnClickedButtonDatetimeSync)
 	ON_BN_CLICKED(IDC_BUTTON_TERMINAL_DISPLAY, &CEAPSimulatorDlg::OnBnClickedButtonTerminalDisplay)
 	ON_BN_CLICKED(IDC_BUTTON_ED_EVENT_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonEdEventReport)
+	ON_BN_CLICKED(IDC_BUTTON_ED_ALARM_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonEdAlarmReport)
 END_MESSAGE_MAP()
 
 
@@ -166,6 +167,7 @@
 	SetDlgItemInt(IDC_EDIT_PORT, 7000);
 	SetGroup2Enabled(FALSE);
 	SetGroup1Enabled(TRUE);
+	::SetProp(GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->m_hWnd, _T("Enable"), (void*)1);
 
 
 	// log edit
@@ -258,6 +260,7 @@
 	GetDlgItem(IDC_BUTTON_DATETIME_SYNC)->EnableWindow(enabled);
 	GetDlgItem(IDC_BUTTON_TERMINAL_DISPLAY)->EnableWindow(enabled);	
 	GetDlgItem(IDC_BUTTON_ED_EVENT_REPORT)->EnableWindow(enabled);
+	GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->EnableWindow(enabled);	
 }
 
 void CEAPSimulatorDlg::OnBnClickedButtonConnect()
@@ -296,3 +299,14 @@
 	CEDEventReportDlg dlg;
 	dlg.DoModal();
 }
+
+void CEAPSimulatorDlg::OnBnClickedButtonEdAlarmReport()
+{
+	int enable = (int)::GetProp(GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->m_hWnd, _T("Enable"));
+	enable = enable == 0 ? 1 : 0;
+	theApp.m_model.m_pHsmsActive->hsmsEDAlarmReport(enable == 1, 0);
+
+	SetDlgItemText(IDC_BUTTON_ED_ALARM_REPORT, 
+		enable == 1 ? _T("Disable Alarm Report") : _T("Enable Alarm Report"));
+	::SetProp(GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->m_hWnd, _T("Enable"), (void*)enable);
+}

--
Gitblit v1.9.3