From 5edb485d226790306097e40ea954efb2ed90dd21 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 11 八月 2025 16:05:09 +0800
Subject: [PATCH] 1.EAP:查询CJSpace和PJSpace功能模拟,Master对EAP查询机器变量的回复;
---
SourceCode/Bond/Servo/CEquipment.cpp | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 0d99db6..7560957 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++) {
@@ -1362,6 +1377,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 +1990,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