| | |
| | | /// CControlJob:Control Job 管理类 |
| | | class CControlJob { |
| | | public: |
| | | CControlJob(); |
| | | explicit CControlJob(std::string cjId); |
| | | explicit CControlJob(CControlJob& src); |
| | | |
| | |
| | | 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 }; // 缺省优先级(自定) |