LAPTOP-SNT8I5JK\Boounion
2025-02-27 4d1e6979820d9aaf27890a833ae0fcb6959e8637
SourceCode/Bond/Servo/CEquipment.cpp
@@ -16,6 +16,7 @@
      m_bAutoRecipeChange = FALSE;
      m_bVCREnable[0] = FALSE;
      m_pCclink = nullptr;
      m_nBaseAlarmId = 0;
      InitializeCriticalSection(&m_criticalSection);
   }
@@ -40,6 +41,16 @@
      m_pCclink = pCcLink;
   }
   void CEquipment::setBaseAlarmId(int nBaseId)
   {
      m_nBaseAlarmId = nBaseId;
   }
   int CEquipment::getBaseAlarmId()
   {
      return m_nBaseAlarmId;
   }
   void CEquipment::getProperties(std::vector<std::pair<std::string, std::string>>& container)
   {
      container.clear();
@@ -60,6 +71,7 @@
   {
      auto iter = m_mapStep.find(addr);
      if (iter != m_mapStep.end()) return -1;
      pStep->setEquipment(this);
      pStep->setCcLink(m_pCclink);
      m_mapStep[addr] = pStep;
      return 0;
@@ -242,20 +254,16 @@
      // 以下根据信号做流程处理
      CStep* pStep;
      // Equipment Mode Change Report
      index = 0x360;
      bFlag = isBitOn(pszData, size, index);
      pStep = getStep(index);
      if (pStep != nullptr) {
         pStep->onSignal(bFlag);
      }
      // Equipment Status Change Report
      index = 0x361;
      bFlag = isBitOn(pszData, size, index);
      pStep = getStep(index);
      if (pStep != nullptr) {
         pStep->onSignal(bFlag);
      // Equipment Mode Change Report(0x360)
      // Equipment Status Change Report(0x361)
      // Equipment Alarm Change Report(0x362 ~ 0x366)
      for (int i = 0; i < 7; i++) {
         index = 0x360 + i;;
         bFlag = isBitOn(pszData, size, index);
         pStep = getStep(index);
         if (pStep != nullptr) {
            pStep->onSignal(bFlag);
         }
      }
   }