From 3e0ceaf4e569ea1f57a14de2f6135d1f1a50d080 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 27 八月 2025 13:47:31 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/CEquipment.cpp | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 0d99db6..bfdec30 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/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()
@@ -1623,7 +1655,7 @@
int CEquipment::decodeVCREventReport(CStep* pStep, const char* pszData, size_t size)
{
CVcrEventReport vcrEventReport;
- vcrEventReport.unserialize(pszData, size);
+ vcrEventReport.unserialize(pszData, (int)size);
LOGI("<CEquipment-%s>decodeVCREventReport<Result:%d, GlassId:%s>\n", m_strName.c_str(),
vcrEventReport.getVcrResult(),
vcrEventReport.getGlassId().c_str());
@@ -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;
}
--
Gitblit v1.9.3