From 34f6893ffa45a2eeb3636605d5b7c6289d879aa4 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 20 九月 2025 13:42:48 +0800
Subject: [PATCH] 1.修复和测试Bath调度,更新数据应用到Master时出错的问题;
---
SourceCode/Bond/Servo/ProcessJob.cpp | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/ProcessJob.cpp b/SourceCode/Bond/Servo/ProcessJob.cpp
index 1ae4b9e..e58845b 100644
--- a/SourceCode/Bond/Servo/ProcessJob.cpp
+++ b/SourceCode/Bond/Servo/ProcessJob.cpp
@@ -186,9 +186,11 @@
return true;
}
- bool CProcessJob::abort() {
+ bool CProcessJob::abort(std::string reason) {
if (m_state == PJState::Completed || m_state == PJState::Aborted || m_state == PJState::Failed)
return false;
+ m_failReason = trimCopy(reason);
+ clampString(m_failReason, 128);
m_state = PJState::Aborted;
markEnd();
return true;
@@ -275,6 +277,31 @@
}
}
+ bool CProcessJob::setCarrierSlotsAndContexts(std::string carrierId, std::vector<uint8_t> slots, std::vector<void*> contexts)
+ {
+ for (auto& c : m_carriers) {
+ if (c.carrierId.compare(carrierId) == 0) {
+ c.slots = std::move(slots);
+ c.contexts = std::move(contexts);
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool CProcessJob::setCarrierContexts(std::string carrierId, std::vector<void*> contexts)
+ {
+ for (auto& c : m_carriers) {
+ if (c.carrierId.compare(carrierId) == 0) {
+ c.contexts = std::move(contexts);
+ return true;
+ }
+ }
+
+ return false;
+ }
+
// --------- 核心:serialize/deserialize ---------
void CProcessJob::serialize(std::ostream& os) const {
// 头
--
Gitblit v1.9.3