LAPTOP-SNT8I5JK\Boounion
2025-08-22 7a20b6f44d2ea3f23ef8d228ec4c1424925e5dfb
SourceCode/Bond/Servo/CEquipment.cpp
@@ -1292,6 +1292,21 @@
      return nullptr;
   }
   CSlot* CEquipment::isSlotAvailable(unsigned int slot)
   {
      if (slot >= 8) return nullptr;
      if (!m_slot[slot].isEnable()) return nullptr;
      if (m_slot[slot].isLock()) return nullptr;
      if (!m_slot[slot].isEmpty()) return nullptr;
      int lsPath = m_slot[slot].getLinkSignalPath();
      if (!m_bLinkSignalToDownstream[lsPath][SIGNAL_UPSTREAM_INLINE]
         || m_bLinkSignalToDownstream[lsPath][SIGNAL_UPSTREAM_TROUBLE]
         || !m_bLinkSignalToDownstream[lsPath][SIGNAL_INTERLOCK]
         || !m_bLinkSignalToDownstream[lsPath][SIGNAL_RECEIVE_ABLE]) return nullptr;
      return &m_slot[slot];
   }
   CSlot* CEquipment::getNonEmptySlot(MaterialsType putSlotType)
   {
      for (int i = 0; i < SLOT_MAX; i++) {
@@ -1310,7 +1325,7 @@
      return nullptr;
   }
   CSlot* CEquipment::getProcessedSlot(MaterialsType putSlotType)
   CSlot* CEquipment::getProcessedSlot(MaterialsType putSlotType, BOOL bJobMode/* = FALSE*/)
   {
      for (int i = 0; i < SLOT_MAX; i++) {
         if (!m_slot[i].isEnable()) continue;
@@ -1319,6 +1334,7 @@
         if (!isSlotProcessed(i)) continue;
         if (pGlass == nullptr) continue;
         if (!pGlass->isScheduledForProcessing()) continue;
         if (bJobMode && pGlass->getProcessJob() == nullptr) continue;
         if(pGlass->getInspResult(m_nID, 0) == InspResult::Fail) continue;
         int lsPath = m_slot[i].getLinkSignalPath();
         if(!m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_INLINE]
@@ -1362,6 +1378,22 @@
      }
      return nullptr;
   }
   CSlot* CEquipment::getProcessedSlotCt(unsigned int slot)
   {
      if (slot >= 8) return nullptr;
      if (!m_slot[slot].isEnable()) return nullptr;
      if (m_slot[slot].isLock()) return nullptr;
      CGlass* pGlass = (CGlass*)m_slot[slot].getContext();
      if (pGlass == nullptr) return nullptr;
      int lsPath = m_slot[slot].getLinkSignalPath();
      if (!m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_INLINE]
         || m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_TROUBLE]
         || !m_bLinkSignalToUpstream[lsPath][SIGNAL_INTERLOCK]
         || !m_bLinkSignalToUpstream[lsPath][SIGNAL_SEND_ABLE]) return nullptr;
      return &m_slot[slot];
   }
   CSlot* CEquipment::getInspFailSlot()
@@ -1959,14 +1991,14 @@
    */
   int CEquipment::onSendAble(int port)
   {
      LOGI("<CEquipment-%s>onSendAble.port:%d", m_strName.c_str(), port);
      // LOGI("<CEquipment-%s>onSendAble.port:%d", m_strName.c_str(), port);
      return 0;
   }
   int CEquipment::onReceiveAble(int port)
   {
      LOGI("<CEquipment-%s>onReceiveAble.port:%d", m_strName.c_str(), port);
      // LOGI("<CEquipment-%s>onReceiveAble.port:%d", m_strName.c_str(), port);
      return 0;
   }