247a2a9a9f3d699df42a009bf124d3b536ad6b37..bfe14e41fa5b07771d78af4511ba18d706bc23cc
2025-07-28 LAPTOP-SNT8I5JK\Boounion
1.Spooling Config功能EAP模拟测试;
bfe14e 对比 | 目录
2025-07-28 LAPTOP-SNT8I5JK\Boounion
1.暂存
e20a6e 对比 | 目录
已修改9个文件
108 ■■■■■ 文件已修改
Document/Panel Bonder八零联合 SecsTest CheckList_v3.0.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/CHsmsActive.cpp 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/CHsmsActive.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/EAPSimulator.rc 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/EAPSimulator/Resource.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.cpp 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.h 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Document/Panel Bonder°ËÁãÁªºÏ SecsTest CheckList_v3.0.xlsx
Binary files differ
SourceCode/Bond/EAPSimulator/CHsmsActive.cpp
@@ -245,6 +245,27 @@
    return 0;
}
int CHsmsActive::hsmsConfigureSpooling(std::map<unsigned int, std::set<unsigned int>>& spoolingConfig)
{
    IMessage* pMessage = nullptr;
    int nRet = HSMS_Create1Message(pMessage, m_nSessionId, 2 | REPLY, 43, ++m_nSystemByte);
    if (spoolingConfig.size() > 0) {
        for (auto s : spoolingConfig) {
            ISECS2Item* pItemStreamList = pMessage->getBody()->addItem();
            pItemStreamList->addU1Item(s.first, "STRID");
            ISECS2Item* pItemFcnList = pItemStreamList->addItem();
            for (auto f : s.second) {
                pItemFcnList->addU1Item(f, "FCNID");
            }
        }
    }
    m_pActive->sendMessage(pMessage);
    HSMS_Destroy1Message(pMessage);
    return 0;
}
int CHsmsActive::replyAck0(IMessage* pMessage)
{
    return 0;
SourceCode/Bond/EAPSimulator/CHsmsActive.h
@@ -2,6 +2,7 @@
#include <string>
#include <vector>
#include <map>
#include <set>
#include "CCollectionEvent.h"
@@ -53,6 +54,9 @@
    // Line Event Report
    int hsmsLinkEventReport(std::map<unsigned int, std::vector<unsigned int>>& mapEvent);
    // Configure Spooling
    int hsmsConfigureSpooling(std::map<unsigned int, std::set<unsigned int>>& spoolingConfig);
    // é€šè¿‡çš„reply函数
    void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName);
SourceCode/Bond/EAPSimulator/EAPSimulator.rc
Binary files differ
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -84,6 +84,7 @@
    ON_BN_CLICKED(IDC_BUTTON_ED_ALARM_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonEdAlarmReport)
    ON_BN_CLICKED(IDC_BUTTON_DEFINE_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonDefineReport)
    ON_BN_CLICKED(IDC_BUTTON_LINE_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonLineReport)
    ON_BN_CLICKED(IDC_BUTTON_CONFIGURE_SPOOLING, &CEAPSimulatorDlg::OnBnClickedButtonConfigureSpooling)
END_MESSAGE_MAP()
@@ -267,6 +268,7 @@
    GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->EnableWindow(enabled);    
    GetDlgItem(IDC_BUTTON_DEFINE_REPORT)->EnableWindow(enabled);
    GetDlgItem(IDC_BUTTON_LINE_REPORT)->EnableWindow(enabled);    
    GetDlgItem(IDC_BUTTON_CONFIGURE_SPOOLING)->EnableWindow(enabled);
}
void CEAPSimulatorDlg::OnBnClickedButtonConnect()
@@ -328,3 +330,28 @@
    CLinkReportDlg dlg;
    dlg.DoModal();
}
void CEAPSimulatorDlg::OnBnClickedButtonConfigureSpooling()
{
    std::map<unsigned int, std::set<unsigned int>> spoolingConfig;
    // test clear all
    // theApp.m_model.m_pHsmsActive->hsmsConfigureSpooling(spoolingConfig);
    // test add s2[1,3,5];
    // spoolingConfig[2].insert(1);
    // spoolingConfig[2].insert(3);
    // spoolingConfig[2].insert(5);
    // spoolingConfig[3].insert(2);
    // spoolingConfig[3].insert(4);
    // spoolingConfig[3].insert(6);
    // theApp.m_model.m_pHsmsActive->hsmsConfigureSpooling(spoolingConfig);
    // test clear S2
    // spoolingConfig[2].clear();
    // theApp.m_model.m_pHsmsActive->hsmsConfigureSpooling(spoolingConfig);
    spoolingConfig[5].insert(66);
    theApp.m_model.m_pHsmsActive->hsmsConfigureSpooling(spoolingConfig);
}
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h
@@ -53,4 +53,5 @@
    afx_msg void OnBnClickedButtonEdAlarmReport();
    afx_msg void OnBnClickedButtonDefineReport();
    afx_msg void OnBnClickedButtonLineReport();
    afx_msg void OnBnClickedButtonConfigureSpooling();
};
SourceCode/Bond/EAPSimulator/Resource.h
@@ -29,6 +29,8 @@
#define IDC_BUTTON_DEFINE_REPORT        1010
#define IDC_BUTTON_LINE_REPORT          1011
#define IDC_RADIO_ENABLE                1012
#define IDC_BUTTON_LINE_REPORT2         1012
#define IDC_BUTTON_CONFIGURE_SPOOLING   1012
#define IDC_RADIO_DISABLE               1013
#define IDC_EDIT_CEID                   1014
#define IDC_LIST1                       1015
SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -521,6 +521,9 @@
        else if (nStream == 2 && pHeader->function == 41) {
            replyCommand(pMessage);
        }
        else if (nStream == 2 && pHeader->function == 43) {
            replyConfigureSpooling(pMessage);
        }
        else if (nStream == 5 && pHeader->function == 3) {
            replyEanbleDisableAlarmReport(pMessage);
        }
@@ -1067,6 +1070,51 @@
    return 0;
}
// S2F43
int CHsmsPassive::replyConfigureSpooling(IMessage* pRecv)
{
    if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
        return ER_NOTSELECT;
    }
    ISECS2Item* pBody = pRecv->getBody();
    if (pBody == nullptr || pBody->getType() != SITYPE::L) ER_PARAM_ERROR;
    // æ¸…空所有
    if (pBody->getSubItemSize() == 0) {
        m_spoolingConfig.clear();
        goto MYREPLY;
    }
    // ä¾æ¬¡é…ç½®Stream
    for (int i = 0; i < pBody->getSubItemSize(); i++) {
        ISECS2Item* pStreamItem = pBody->getSubItem(i);
        ASSERT(pStreamItem);
        unsigned char STRID, FCNID;
        pStreamItem->getSubItemU1(0, STRID);
        ISECS2Item* pFcnItemList = pStreamItem->getSubItem(1);
        if (pFcnItemList->getSubItemSize() == 0) {
            m_spoolingConfig[STRID].clear();
        }
        else {
            for (int j = 0; j < pFcnItemList->getSubItemSize(); j++) {
                pFcnItemList->getSubItemU1(j, FCNID);
                m_spoolingConfig[STRID].insert(FCNID);
            }
        }
    }
    // æ‰“印验证结果
    for (auto s : m_spoolingConfig) {
        LOGI("====> stream:%d", s.first);
        for (auto f : s.second) {
            LOGI("function:%d", f);
        }
    }
MYREPLY:
    replyAck(2, 42, pRecv->getHeader()->systemBytes, BYTE(0), "ERACK");
    return 0;
}
// S5F3
int CHsmsPassive::replyEanbleDisableAlarmReport(IMessage* pRecv)
{
SourceCode/Bond/Servo/HsmsPassive.h
@@ -5,6 +5,7 @@
#include <functional>
#include <vector>
#include <map>
#include <set>
#include "CCollectionEvent.h"
@@ -164,6 +165,7 @@
    int replyLinkEventReport(IMessage* pRecv);
    int replyEanbleDisableEventReport(IMessage* pRecv);
    int replyCommand(IMessage* pRecv);
    int replyConfigureSpooling(IMessage* pRecv);
    int replyEanbleDisableAlarmReport(IMessage* pRecv);
    int replyQueryPPIDList(IMessage* pRecv);
    int replyTerminalDisplay(IMessage* pRecv);
@@ -204,5 +206,8 @@
    // CollectionEvent vector
    std::vector<SERVO::CCollectionEvent*> m_collectionEvents;
    // Spooling Config
    std::map<uint16_t, std::set<uint16_t>> m_spoolingConfig;
};