1#ifndef YODAU_BACKEND_EVENT_HPP
2#define YODAU_BACKEND_EVENT_HPP
13
14
15
16
17
18
31
32
33
34
35
36
37
38
39
40
41
42
43
46
47
48
49
53
54
55
56
60
61
62
63
64
68
69
70 std::chrono::steady_clock::time_point
ts;
73
74
75
76
77
78
82
83
84
85
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.
std::function< void(const std::string &stream_name, frame &&f)> manual_push_fn
Hook for manual frame pushing.
Represents a single video stream and its analytic connections.
static yodau::backend::tripwire_dir parse_tripwire_dir(const std::string &s)
std::shared_ptr< line const > line_ptr
Shared, immutable line pointer.
event_kind
High-level classification of backend events.
tripwire_dir
Allowed crossing direction for a tripwire.
Generic event produced by the backend.
std::chrono::steady_clock::time_point ts
Monotonic timestamp when the event was generated.
event_kind kind
Type of the event.
std::string stream_name
Name/identifier of the stream that produced the event.
std::optional< point > pos_pct
Optional position associated with the event in percentage coordinates.
std::string line_name
Name of the line / ROI / rule responsible for this event.
std::string message
Human-readable event description or payload.
Point in percentage-based image coordinates.