From 549decf91ef988814913cddc86f5c4e006b277e7 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 21 八月 2025 05:27:48 +0800
Subject: [PATCH] Merge branch 'clh' of http://soft.boounion.cn/r/~chenluhua/Bond2 into clh

---
 SourceCode/Bond/Servo/CControlJob.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/CControlJob.h b/SourceCode/Bond/Servo/CControlJob.h
index a9611a4..c5fdf60 100644
--- a/SourceCode/Bond/Servo/CControlJob.h
+++ b/SourceCode/Bond/Servo/CControlJob.h
@@ -36,6 +36,7 @@
     /// CControlJob:Control Job 管理类
     class CControlJob {
     public:
+        CControlJob();
         explicit CControlJob(std::string cjId);
         explicit CControlJob(CControlJob& src);
 
@@ -111,12 +112,18 @@
         static void clampString(std::string& s, size_t maxLen);
         static bool asciiPrintable(const std::string& s);
 
+        static constexpr uint32_t CJ_MAGIC = 0x434A5031; // "CJP1"
+        static constexpr uint16_t CJ_VERSION = 0x0001;
+
+        void serialize(std::ostream& os) const;
+        static bool deserialize(std::istream& is, CControlJob& out, std::string* err = nullptr);
+
     private:
         void markQueued();
         void markStart();
         void markEnd();
 
-    private:
+    protected:
         // —— 标识 & 配置 —— //
         std::string m_cjId;
         uint8_t     m_priority{ 5 }; // 缺省优先级(自定)

--
Gitblit v1.9.3