🛰️航天仿真算法库 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
27
AST_NAMESPACE_BEGIN
28
29
class
PilotCommander;
30
40
class
AST_UIPILOT_API
PilotPipeServer
41
{
42
public
:
46
explicit
PilotPipeServer
(
PilotCommander
* commander,
unsigned
long
pid);
47
PilotPipeServer
(
const
PilotPipeServer
&) =
delete
;
48
PilotPipeServer
& operator=(
const
PilotPipeServer
&) =
delete
;
49
51
~PilotPipeServer
();
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
65
private
:
67
void
serverLoop();
68
69
PilotCommander
* commander_{};
70
unsigned
long
pid_{};
71
std::atomic<bool> running_{
false
};
72
std::thread serverThread_{};
73
};
74
77
AST_NAMESPACE_END
ast::PilotCommander
命令调度器
定义
PilotCommander.hpp:44
ast::PilotPipeServer
Named Pipe 服务端
定义
PilotPipeServer.hpp:41
ast::PilotPipeServer::isRunning
bool isRunning() const
是否正在运行
定义
PilotPipeServer.hpp:60
src
AstUiPilot
PilotPipeServer.hpp
制作者
1.12.0