From bca7e5d43c28757b3de88050e585eb40aa202bce Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 27 一月 2026 15:50:21 +0800
Subject: [PATCH] 1.增加机台事件的上报时关联机器名,slot
---
SourceCode/Bond/Servo/Model.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index b345e3d..c7d3597 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -803,6 +803,10 @@
auto sendSv = [&](const auto& vidMap, const char* evName) {
const size_t count = (std::min)(params.size(), vidMap.size());
m_hsmsPassive.withVariableLock([&] {
+ if (pEquipment != nullptr) {
+ m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
+ }
+ m_hsmsPassive.setVariableValue("SubEqpSlot", 0);
m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str());
for (size_t idx = 0; idx < count; ++idx) {
const std::string val = formatParamValue(params[idx]);
@@ -845,6 +849,10 @@
auto sendProcess = [&](const auto& vidMap, const char* evName) {
const size_t count = (std::min)(params.size(), vidMap.size());
m_hsmsPassive.withVariableLock([&] {
+ if (pEquipment != nullptr) {
+ m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
+ }
+ m_hsmsPassive.setVariableValue("SubEqpSlot", 0);
m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str());
for (size_t idx = 0; idx < count; ++idx) {
const std::string val = formatParamValue(params[idx]);
--
Gitblit v1.9.3