chenluhua1980
2026-01-10 6d140a6e6f2c24c9c7de46bb7c375ae4cbf931e7
SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -1370,6 +1370,9 @@
      else if (nStream == 7 && pHeader->function == 19) {
         replyQueryPPIDList(pMessage);
      }
      else if (nStream == 7 && pHeader->function == 17) {
         replyDeletePPID(pMessage);
      }
      else if (nStream == 10 && pHeader->function == 3) {
         replyTerminalDisplay(pMessage);
      }
@@ -2544,6 +2547,44 @@
   return 0;
}
// S7F17 Delete Process Program (PPID list) / S7F18
int CHsmsPassive::replyDeletePPID(IMessage* pRecv)
{
   if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) {
      return ER_NOTSELECT;
   }
   bool allOk = true;
   const bool deleteAll = (pRecv->getBody() == nullptr || pRecv->getBody()->getSubItemSize() == 0);
   std::vector<std::string> ppids;
   ISECS2Item* pBody = pRecv->getBody();
   const int nCount = pBody ? pBody->getSubItemSize() : 0;
   for (int i = 0; i < nCount; ++i) {
      const char* pszPPID = nullptr;
      if (pBody->getSubItemString(i, pszPPID) && pszPPID != nullptr) {
         ppids.emplace_back(pszPPID);
      }
      else {
         allOk = false;
      }
   }
   if (deleteAll || !ppids.empty()) {
      if (m_listener.onDeletePPID != nullptr) {
         allOk = m_listener.onDeletePPID(this, ppids);
      }
      else {
         // no handler provided; treat as failure
         allOk = false;
         LOGW("<HSMS>DeletePPID request ignored: no onDeletePPID listener");
      }
   }
   replyAck(7, 18, pRecv->getHeader()->systemBytes, allOk ? BYTE(0) : BYTE(1), "ACKC7");
   return 0;
}
// S7F19
int CHsmsPassive::replyQueryPPIDList(IMessage* pRecv)
{