From 44360bc2cdeee16be72f9cc4bfb42e0ac26b5b44 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 19 一月 2026 14:47:19 +0800
Subject: [PATCH] 1.修改优化
---
SourceCode/Bond/Servo/CEquipment.cpp | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index e4085e9..3de5521 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -208,6 +208,21 @@
return m_strDescription;
}
+ void CEquipment::setCurrentRecipe(const std::string& recipe)
+ {
+ Lock();
+ m_currentRecipe = recipe;
+ Unlock();
+ }
+
+ std::string CEquipment::getCurrentRecipe()
+ {
+ Lock();
+ std::string out = m_currentRecipe;
+ Unlock();
+ return out;
+ }
+
void CEquipment::setStation(int network, int station)
{
m_station.nNetNo = network;
@@ -1608,8 +1623,11 @@
std::vector<CParam> tempParams;
this->parsingProcessData((const char*)rawData.data(), rawData.size(), tempParams);
int n = processData.getTotalParameter();
- std::vector<CParam> params(tempParams.begin(), tempParams.begin() + min(n, (int)tempParams.size()));
+ std::vector<CParam> params(tempParams.begin(), tempParams.begin() + (std::min)(n, (int)tempParams.size()));
pGlass->addParams(params);
+ if (m_listener.onProcessDataReport != nullptr) {
+ m_listener.onProcessDataReport(this, params);
+ }
// 鍏宠仈鐨凣lass涔熻鏇存柊
CGlass* pBuddy = pGlass->getBuddy();
@@ -1617,6 +1635,9 @@
if (pBuddy != nullptr) {
LOGI("<Equipment-%s>decodeProcessDataReport addParams pBuddy=%x %s", getName().c_str(), pBuddy, pGlass->getID().c_str());
pBuddy->addParams(params);
+ if (m_listener.onProcessDataReport != nullptr) {
+ m_listener.onProcessDataReport(this, params);
+ }
}
return nRet;
@@ -1649,6 +1670,10 @@
m_strName.c_str(), nRet);
}
+ if (m_listener.onReceivedJob != nullptr) {
+ m_listener.onReceivedJob(this, port, pJobDataS);
+ }
+
return nRet;
}
--
Gitblit v1.9.3