🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
PilotPipeServer.hpp
浏览该文件的文档.
1
19
20#pragma once
21
22#include "AstGlobal.h"
23#include <string>
24#include <atomic>
25#include <thread>
26
27AST_NAMESPACE_BEGIN
28
29class PilotCommander;
30
40class AST_UIPILOT_API PilotPipeServer
41{
42public:
46 explicit PilotPipeServer(PilotCommander* commander, unsigned long pid);
47 PilotPipeServer(const PilotPipeServer&) = delete;
48 PilotPipeServer& operator=(const PilotPipeServer&) = delete;
49
52
54 void start();
55
57 void stop();
58
60 bool isRunning() const { return running_; }
61
63 static std::string pipeName(unsigned long pid);
64
65private:
67 void serverLoop();
68
69 PilotCommander* commander_{};
70 unsigned long pid_{};
71 std::atomic<bool> running_{false};
72 std::thread serverThread_{};
73};
74
77AST_NAMESPACE_END
命令调度器
定义 PilotCommander.hpp:44
Named Pipe 服务端
定义 PilotPipeServer.hpp:41
bool isRunning() const
是否正在运行
定义 PilotPipeServer.hpp:60