From 260b16a1debe7dbc33982768a37dfd48ca34b248 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期五, 09 一月 2026 14:27:21 +0800
Subject: [PATCH] 1.EAP模拟器完善

---
 SourceCode/Bond/EAPSimulator/Resource.h          |    3 ++-
 SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp |   21 +++++++++++++++++++++
 SourceCode/Bond/EAPSimulator/CHsmsActive.h       |   15 ++++++++-------
 SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h   |    1 +
 4 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/SourceCode/Bond/EAPSimulator/CHsmsActive.h b/SourceCode/Bond/EAPSimulator/CHsmsActive.h
index 00efb31..cb63df1 100644
--- a/SourceCode/Bond/EAPSimulator/CHsmsActive.h
+++ b/SourceCode/Bond/EAPSimulator/CHsmsActive.h
@@ -1,4 +1,4 @@
-#pragma once
+锘�#pragma once
 #include <string>
 #include <vector>
 #include <map>
@@ -8,6 +8,7 @@
 
 
 #define SVID_ControlState           600
+#define SVID_CurrentProcessState    700
 #define SVID_CJobSpace            5001
 #define SVID_PJobSpace				5002
 #define SVID_PJobQueued				5003
@@ -37,7 +38,7 @@
 	// Deselect Request
 	int hsmsDeselectRequest();
 
-	// 建立通讯(S1F13)
+	// 寤虹珛閫氳(S1F13)
 	int hsmsEstablishCommunications();
 
 	// Are You There
@@ -72,18 +73,18 @@
 	// Configure Spooling
 	int hsmsConfigureSpooling(std::map<unsigned int, std::set<unsigned int>>& spoolingConfig);
 
-	// 发送或清空缓存的消息
+	// 鍙戦�佹垨娓呯┖缂撳瓨鐨勬秷鎭�
 	int hsmsTransmitSpooledData();
 	int hsmsPurgeSpooledData();
 
-	// 查询变量
+	// 鏌ヨ鍙橀噺
 	int hsmsSelectedEquipmentStatusRequest(unsigned int SVID);
 
-	// 查询PPID List
+	// 鏌ヨPPID List
 	int hsmsQueryPPIDList();
 
 	// S3F17
-	// 卡匣动作请求
+	// 鍗″專鍔ㄤ綔璇锋眰
 	int hsmsCarrierActionRequest(unsigned int DATAID, 
 		const char* pszCarrierAction,
 		const char* pszCarrierId,
@@ -107,7 +108,7 @@
 	// S14F9
 	int hsmsCreateControlJob(const char* pszControlJobId, std::vector<std::string>& processJobIds);
 
-	// 通过的reply函数
+	// 閫氳繃鐨剅eply鍑芥暟
 	void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
 
 	// reply ack0
diff --git a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
index 2a3bcc0..1ec5d11 100644
--- a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
+++ b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -102,6 +102,7 @@
 	ON_BN_CLICKED(IDC_BUTTON_CTRL_ONLINE_LOCAL, &CEAPSimulatorDlg::OnBnClickedButtonCtrlOnlineLocal)
 	ON_BN_CLICKED(IDC_BUTTON_CTRL_ONLINE_REMOTE, &CEAPSimulatorDlg::OnBnClickedButtonCtrlOnlineRemote)
 	ON_BN_CLICKED(IDC_BUTTON_QUERY_CONTROL_STATE, &CEAPSimulatorDlg::OnBnClickedButtonQueryControlState)
+	ON_BN_CLICKED(IDC_BUTTON_QUERY_PROCESS_STATE, &CEAPSimulatorDlg::OnBnClickedButtonQueryProcessState)
 END_MESSAGE_MAP()
 
 
@@ -236,6 +237,18 @@
 			::SendMessage(hBtn, WM_SETFONT, (WPARAM)GetFont()->GetSafeHandle(), TRUE);
 		}
 	}
+	// S1F3 Query ProcessState (SVID=700) button
+	{
+		CRect rc(14, 152, 14 + 140, 152 + 14); // dialog units, new row
+		MapDialogRect(&rc);
+		HWND hBtn = ::CreateWindow(_T("BUTTON"), _T("S1F3_QueryProcessState"),
+			WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
+			rc.left, rc.top, rc.Width(), rc.Height(),
+			m_hWnd, (HMENU)IDC_BUTTON_QUERY_PROCESS_STATE, AfxGetInstanceHandle(), nullptr);
+		if (hBtn != nullptr) {
+			::SendMessage(hBtn, WM_SETFONT, (WPARAM)GetFont()->GetSafeHandle(), TRUE);
+		}
+	}
 
 	SetDlgItemText(IDC_EDIT_IP, _T("127.0.0.1"));
 	SetDlgItemInt(IDC_EDIT_PORT, 7000);
@@ -361,6 +374,9 @@
 	}
 	if (GetDlgItem(IDC_BUTTON_QUERY_CONTROL_STATE) != nullptr) {
 		GetDlgItem(IDC_BUTTON_QUERY_CONTROL_STATE)->EnableWindow(enabled);
+	}
+	if (GetDlgItem(IDC_BUTTON_QUERY_PROCESS_STATE) != nullptr) {
+		GetDlgItem(IDC_BUTTON_QUERY_PROCESS_STATE)->EnableWindow(enabled);
 	}
 }
 
@@ -531,3 +547,8 @@
 {
 	theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_ControlState);
 }
+
+void CEAPSimulatorDlg::OnBnClickedButtonQueryProcessState()
+{
+	theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_CurrentProcessState);
+}
diff --git a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h
index 3afdb16..6dd9524 100644
--- a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h
+++ b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h
@@ -68,4 +68,5 @@
 	afx_msg void OnBnClickedButtonCtrlOnlineLocal();
 	afx_msg void OnBnClickedButtonCtrlOnlineRemote();
 	afx_msg void OnBnClickedButtonQueryControlState();
+	afx_msg void OnBnClickedButtonQueryProcessState();
 };
diff --git a/SourceCode/Bond/EAPSimulator/Resource.h b/SourceCode/Bond/EAPSimulator/Resource.h
index e344952..35a9c71 100644
--- a/SourceCode/Bond/EAPSimulator/Resource.h
+++ b/SourceCode/Bond/EAPSimulator/Resource.h
@@ -62,6 +62,7 @@
 #define IDC_BUTTON_CTRL_ONLINE_LOCAL    1044
 #define IDC_BUTTON_CTRL_ONLINE_REMOTE   1045
 #define IDC_BUTTON_QUERY_CONTROL_STATE  1046
+#define IDC_BUTTON_QUERY_PROCESS_STATE  1047
 
 // Next default values for new objects
 // 
@@ -69,7 +70,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        143
 #define _APS_NEXT_COMMAND_VALUE         32771
-#define _APS_NEXT_CONTROL_VALUE         1047
+#define _APS_NEXT_CONTROL_VALUE         1048
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

--
Gitblit v1.9.3