From ce83df0657786b340be5cc2e9817fb2392117ac9 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 29 五月 2025 16:23:54 +0800
Subject: [PATCH] 1.理顺CRobotTask(搬送任务)和Glass,Slot, JobData等关系,实现创建调度任务,模拟拔片测试;
---
SourceCode/Bond/Servo/CEquipment.cpp | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index edd9ed3..d9fb8e9 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -27,7 +27,7 @@
CEquipment::CEquipment() : m_nID(0), m_strName(""), m_strDescription(""), m_station(0, 255)
{
- m_listener = { nullptr, nullptr, nullptr, nullptr, nullptr };
+ m_listener = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
m_alive = { FALSE, 0, FALSE };
m_bCimState = FALSE;
m_bUpstreamInline = FALSE;
@@ -76,6 +76,7 @@
m_listener.onAlarm = listener.onAlarm;
m_listener.onDataChanged = listener.onDataChanged;
m_listener.onVcrEventReport = listener.onVcrEventReport;
+ m_listener.onPreFethedOutJob = listener.onPreFethedOutJob;
}
void CEquipment::setCcLink(CCCLinkIEControl* pCcLink)
@@ -321,6 +322,9 @@
Lock();
for (int i = 0; i < SLOT_MAX; i++) {
m_slot[i].serialize(ar);
+ if (m_slot[i].getContext() != nullptr) {
+ ((CGlass*)m_slot[i].getContext())->serialize(ar);
+ }
}
Unlock();
}
@@ -751,7 +755,7 @@
Unlock();
if (m_listener.onDataChanged != nullptr) {
- m_listener.onDataChanged(this, 0);
+ m_listener.onDataChanged(this, EDCC_FETCHOUT_JOB);
}
return 0;
@@ -791,7 +795,7 @@
if (m_listener.onDataChanged != nullptr) {
- m_listener.onDataChanged(this, 0);
+ m_listener.onDataChanged(this, EDCC_STORED_JOB);
}
*/
return 0;
@@ -1230,10 +1234,14 @@
return index;
}
- int CEquipment::onPreFetchedOutJob(int port, CJobDataB* pJobDataB)
+ BOOL CEquipment::onPreFetchedOutJob(int port, CJobDataB* pJobDataB)
{
LOGI("<CEquipment-%s>onPreFetchedOutJob:port:%d|GlassId:%s",
m_strName.c_str(), port, pJobDataB->getGlassId().c_str());
+ if (m_listener.onPreFethedOutJob != nullptr) {
+ return m_listener.onPreFethedOutJob(this, pJobDataB);
+ }
+
return TRUE;
}
--
Gitblit v1.9.3