SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -1020,12 +1020,58 @@
   return m_collectionEvents;
}
unsigned int CHsmsPassive::getMaxCollectionEventId() const
{
   unsigned int maxId = 0;
   for (auto item : m_collectionEvents) {
      if (item && item->getEventId() > maxId) {
         maxId = item->getEventId();
      }
   }
   return maxId;
}
int CHsmsPassive::deleteCollectionEvent(unsigned short CEID)
{
   for (auto iter = m_collectionEvents.begin(); iter != m_collectionEvents.end(); ++iter) {
      if ((*iter)->getEventId() == CEID) {
         delete (*iter);
         m_collectionEvents.erase(iter);
         return writeCollectionEventsToFile(m_strCollectionEventFilepath);
      }
   }
   return -1;
}
int CHsmsPassive::addCollectionEvent(unsigned int CEID, const char* name, const char* desc, const std::vector<unsigned int>& rptids)
{
   if (getEvent((unsigned short)CEID) != nullptr) {
      return -1;
   }
   auto* pEvent = new SERVO::CCollectionEvent(CEID, name, desc, const_cast<std::vector<unsigned int>&>(rptids));
   for (auto rptid : rptids) {
      SERVO::CReport* pReport = getReport((int)rptid);
      if (pReport != nullptr) {
         pEvent->addReport(pReport);
      }
   }
   m_collectionEvents.push_back(pEvent);
   return writeCollectionEventsToFile(m_strCollectionEventFilepath);
}
int CHsmsPassive::updateCollectionEvent(unsigned int CEID, const char* name, const char* desc, const std::vector<unsigned int>& rptids)
{
   for (auto iter = m_collectionEvents.begin(); iter != m_collectionEvents.end(); ++iter) {
      if ((*iter)->getEventId() == CEID) {
         delete (*iter);
         auto* pEvent = new SERVO::CCollectionEvent(CEID, name, desc, const_cast<std::vector<unsigned int>&>(rptids));
         for (auto rptid : rptids) {
            SERVO::CReport* pReport = getReport((int)rptid);
            if (pReport != nullptr) {
               pEvent->addReport(pReport);
            }
         }
         *iter = pEvent;
         return writeCollectionEventsToFile(m_strCollectionEventFilepath);
      }
   }
@@ -2477,6 +2523,21 @@
   return requestEventReportSend("CarrierID_Readed");
}
int CHsmsPassive::requestEventReportSend_CheckSlotMap()
{
   return requestEventReportSend("CheckSlotMap");
}
int CHsmsPassive::requestEventReportSend_SlotMapVerificationOK()
{
   return requestEventReportSend("SlotMapVerificationOK");
}
int CHsmsPassive::requestEventReportSend_SlotMapVerificationNG()
{
   return requestEventReportSend("SlotMapVerificationNG");
}
int CHsmsPassive::requestEventReportSend_Port_Unload_Ready()
{
   return requestEventReportSend("Port_Unload_Ready");
@@ -2485,6 +2546,11 @@
int CHsmsPassive::requestEventReportSend_Port_Load_Ready()
{
   return requestEventReportSend("Port_Load_Ready");
}
int CHsmsPassive::requestEventReportSend_Port_Ready_To_Release()
{
   return requestEventReportSend("Port_Ready_To_Release");
}
int CHsmsPassive::requestEventReportSend_Port_Blocked()
@@ -2531,6 +2597,5 @@
{
   return requestEventReportSend("OCR_PanelID_Read_OK");
}