LAPTOP-SNT8I5JK\Boounion
2025-02-14 e3599db09ffb168e9755e800ea8d905efe63545f
1.文档
已添加2个文件
已修改4个文件
51 ■■■■■ 文件已修改
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsAction.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.cpp 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoDlg.cpp 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx
Binary files differ
Document/ESWIN_EAS_Equipment_Link_Signal_Specification_v1.1.docx
Binary files differ
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
{
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;
}
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);
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;
}