chenluhua1980
7 小时以前 decceeb6669cadea0302c2e5a8035b920a04f836
SourceCode/Bond/Servo/Model.cpp
@@ -305,7 +305,7 @@
   m_configuration.getUnitId(strUnitId);
   // 机器型号和软件版本号应从配置中读取,当前先固定值
   CString strModeType = _T("Master");
   CString strModeType = _T("Panel Bonder");
   CString strSoftRev = _T("1.0.2");
@@ -537,7 +537,7 @@
   m_hsmsPassive.loadEquipmentConstants((LPTSTR)(LPCTSTR)strVarialbleFile);
   setControlState(m_currentControlState);
   refreshDerivedSVs();
   m_hsmsPassive.init(this, "APP", 7000);
   m_hsmsPassive.init(this, "APP", 5000);
   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);
@@ -985,9 +985,10 @@
   };
   masterListener.onSVDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) {
      (void)pMaster;
      // Keep SV variable cache updated, but do not actively send S6F11 reports.
      const int eqId = pEquipment ? pEquipment->getID() : 0;
      auto sendSv = [&](const auto& vidMap, const char* evName) {
      auto cacheSv = [&](const auto& vidMap) {
         const size_t count = (std::min)(params.size(), vidMap.size());
         m_hsmsPassive.withVariableLock([&] {
            if (pEquipment != nullptr) {
@@ -999,34 +1000,40 @@
               const std::string val = formatParamValue(params[idx]);
               m_hsmsPassive.setVariableValue(std::to_string(vidMap[idx]).c_str(), val.c_str());
            }
            m_hsmsPassive.requestEventReportSend(evName);
         });
      };
      if (eqId == EQ_ID_Bonder1 || eqId == EQ_ID_Bonder2) {
      if (eqId == EQ_ID_Bonder1) {
         static constexpr std::array<int, 19> vids = {
            6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,
            6010,6011,6012,6013,6014,6015,6016,6017,6018
         };
         sendSv(vids, "BonderSVData");
         cacheSv(vids);
      }
      else if (eqId == EQ_ID_Bonder2) {
         static constexpr std::array<int, 19> vids = {
            6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,
            6030,6031,6032,6033,6034,6035,6036,6037,6038
         };
         cacheSv(vids);
      }
      else if (eqId == EQ_ID_VACUUMBAKE) {
         static constexpr std::array<int, 18> vids = {
            6200,6201,6202,6203,6204,6205,6206,6207,6208,
            6209,6210,6211,6212,6213,6214,6215,6216,6217
         };
         sendSv(vids, "VacuumBakeSVData");
         cacheSv(vids);
      }
      else if (eqId == EQ_ID_BAKE_COOLING) {
         static constexpr std::array<int, 20> vids = {
            6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,
            6410,6411,6412,6413,6414,6415,6416,6417,6418,6419
         };
         sendSv(vids, "BakeCoolingSVData");
         cacheSv(vids);
      }
      else if (eqId == EQ_ID_MEASUREMENT) {
         static constexpr std::array<int, 2> vids = { 6600, 6601 };
         sendSv(vids, "MeasurementSVData");
         cacheSv(vids);
      }
   };
   masterListener.onProcessDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) {