LAPTOP-SNT8I5JK\Boounion
2025-07-28 bfe14e41fa5b07771d78af4511ba18d706bc23cc
SourceCode/Bond/Servo/Model.cpp
@@ -108,11 +108,34 @@
         LOGI("onEQConstantRequest: %d, %s", item.id, item.szValue);
      }
   };
   listener.onDatetimeSync = [&](void* pFrom, SYSTEMTIME& time) -> void {
      LOGI("onDatetimeSync: %d%02d%02d%02d%02d%02d", time.wYear,
         time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
      m_master.datetimeSync(time);
   };
   listener.onEnableDisableEventReport = [&](void* pFrom, bool bEnable, std::vector<unsigned int> ids) -> void {
      LOGI("EanbleDisableEventReport bEnable:%s", bEnable ? _T("YES") : _T("NO"));
      if (ids.empty()) {
         m_master.enableEventReport(bEnable);
      }
   };
   listener.onEnableDisableAlarmReport = [&](void* pFrom, bool bEnable, unsigned int id) -> void {
      LOGI("onEnableDisableAlarmReport bEnable:%s, id:%d", bEnable ? _T("YES") : _T("NO"), id);
      if (id == 0) {
         m_master.enableAlarmReport(bEnable);
      }
   };
   m_hsmsPassive.setListener(listener);
   m_hsmsPassive.setEquipmentModelType((LPTSTR)(LPCTSTR)strModeType);
   m_hsmsPassive.setSoftRev((LPTSTR)(LPCTSTR)strSoftRev);
   CString strVarialbleFile;
   strVarialbleFile.Format(_T("%s\\VariableList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
   m_hsmsPassive.loadVarialbles((LPTSTR)(LPCTSTR)strVarialbleFile);
   m_hsmsPassive.init(this, "APP", 7000);
   strVarialbleFile.Format(_T("%s\\ReportList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
   m_hsmsPassive.loadReports((LPTSTR)(LPCTSTR)strVarialbleFile);
   strVarialbleFile.Format(_T("%s\\CollectionEventList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
   m_hsmsPassive.loadCollectionEvents((LPTSTR)(LPCTSTR)strVarialbleFile);
   SERVO::MasterListener masterListener;
@@ -172,9 +195,11 @@
         notify(RX_CODE_ALARM_CLEAR);
      }
      m_hsmsPassive.requestAlarmReport(state,
         pEquipment->getBaseAlarmId() + alarmId,
         strAlarmText.c_str());
      if (m_master.isAlarmReportEnable()) {
         m_hsmsPassive.requestAlarmReport(state,
            pEquipment->getBaseAlarmId() + alarmId,
            strAlarmText.c_str());
      }
   };
   masterListener.onEqVcrEventReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, SERVO::CVcrEventReport* pReport) {
      LOGE("<CModel>onEqVcrEventReport.");