chenluhua1980
2026-01-09 260b16a1debe7dbc33982768a37dfd48ca34b248
1.EAP模拟器完善
已修改4个文件
40 ■■■■ 文件已修改
SourceCode/Bond/EAPSimulator/CHsmsActive.h 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/Resource.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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函数
    // 通过的reply函数
    void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
    // reply ack0
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);
}
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();
};
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