1.SESC模块,增加S7F19的回复(查询PPID列表),目前填充固定数据测试通讯,后期PPID列表数据从CC-Link中获取;
已修改2个文件
26 ■■■■■ 文件已修改
SourceCode/Bond/Servo/HsmsPassive.cpp 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -191,6 +191,9 @@
        else if (nStream == 5 && pHeader->function == 3) {
            replyEanbleDisableAlarmReport(pMessage);
        }
        else if (nStream == 7 && pHeader->function == 19) {
            replyQueryPPIDList(pMessage);
        }
        else if (nStream == 10 && pHeader->function == 3) {
            replyTerminalDisplay(pMessage);
        }
@@ -476,6 +479,28 @@
    return 0;
}
// S7F19
int CHsmsPassive::replyQueryPPIDList(IMessage* pRecv)
{
    if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
        return ER_NOTSELECT;
    }
    IMessage* pMessage = NULL;
    HSMS_Create1Message(pMessage, m_nSessionId, 7, 20, pRecv->getHeader()->systemBytes);
    ASSERT(pMessage);
    ISECS2Item* pItem = pMessage->getBody();
    pItem->addItem("banana1", "PPID1");
    pItem->addItem("banana2", "PPID2");
    m_pPassive->sendMessage(pMessage);
    LOGI("<HSMS>[SECS Msg SEND]S7F20 (SysByte=%u)", pMessage->getHeader()->systemBytes);
    HSMS_Destroy1Message(pMessage);
    return 0;
}
// S10F3
int CHsmsPassive::replyTerminalDisplay(IMessage* pRecv)
{
SourceCode/Bond/Servo/HsmsPassive.h
@@ -43,6 +43,7 @@
    int replyDatetime(IMessage* pRecv);
    int replyEanbleDisableEventReport(IMessage* pRecv);
    int replyEanbleDisableAlarmReport(IMessage* pRecv);
    int replyQueryPPIDList(IMessage* pRecv);
    int replyTerminalDisplay(IMessage* pRecv);
private: