1#ifndef YODAU_BACKEND_CLI_CLIENT_HPP
2#define YODAU_BACKEND_CLI_CLIENT_HPP
14
15
16
17
18
19
20
21
22
23
24
25
26
27
31
32
33
34
35
36
40
41
42
43
44
45
46
47
52
53
54
55
56
57
58
59
60
64
65
66
67
68
69
70
71
73 const std::string& cmd,
const std::vector<std::string>& args
77
78
79
80
81
82
83
84
85
86
88 const std::string& cmd,
const std::vector<std::string>& args,
89 cxxopts::Options& options
93
94
95
96
97
98
102
103
104
105
106
107
108
109
110
111
115
116
117
118
119
120
121
125
126
127
128
129
130
131
135
136
137
138
139
140
144
145
146
147
148
149
150
151
152
153
154
155
156 void cmd_add_line(
const std::vector<std::string>& args)
const;
159
160
161
162
163
164
165
166
167
168
169 void cmd_set_line(
const std::vector<std::string>& args)
const;
172
173
174
175
Simple interactive CLI (REPL) for controlling a stream_manager.
void cmd_start_stream(const std::vector< std::string > &args) const
Handler for start-stream.
void dispatch_command(const std::string &cmd, const std::vector< std::string > &args) const
Dispatch a command to its handler.
void cmd_set_line(const std::vector< std::string > &args) const
Handler for set-line.
int run() const
Run the interactive command loop.
void cmd_add_line(const std::vector< std::string > &args) const
Handler for add-line.
static cxxopts::ParseResult parse_with_cxxopts(const std::string &cmd, const std::vector< std::string > &args, cxxopts::Options &options)
Parse command arguments using cxxopts.
backend::stream_manager & stream_mgr
Stream manager controlled by this CLI.
void cmd_stop_stream(const std::vector< std::string > &args) const
Handler for stop-stream.
void cmd_list_streams(const std::vector< std::string > &args) const
Handler for list-streams.
void cmd_add_stream(const std::vector< std::string > &args) const
Handler for add-stream.
void cmd_list_lines(const std::vector< std::string > &args) const
Handler for list-lines.
cli_client(backend::stream_manager &mgr)
Construct a CLI client operating on an existing manager.
static std::vector< std::string > tokenize(const std::string &line)
Split a line into whitespace-separated tokens.
Central coordinator for streams, geometry, frame processing and events.
static yodau::backend::tripwire_dir parse_tripwire_dir(const std::string &s)
tripwire_dir
Allowed crossing direction for a tripwire.