88 #include "../base/plugin.h"
89 #include "../impl/types.h"
164 virtual bool init(
const std::string& config) = 0;
263 virtual void flush();
Abstract plugin base notified across a TriggerRecorder's life cycle and dump pipeline.
Definition: trigger_plugin_interface.h:103
virtual void on_frame(const Frame &frame, const DumpContext &context)
Inspects each frame as it is submitted to the writer (hot path).
Definition: trigger_plugin_interface.h:281
virtual bool init(const std::string &config)=0
Initialises the plugin with an opaque configuration string.
virtual void on_dump_started(const DumpContext &context)
Notifies the plugin that the output file has been opened and writing is beginning.
Definition: trigger_plugin_interface.h:279
virtual void on_dump_failed(const DumpResult &result)
Notifies the plugin that a dump was aborted before completion.
Definition: trigger_plugin_interface.h:286
virtual void on_file_rotated(const std::string &path)
Notifies the plugin that an old dump file was removed by rotation.
Definition: trigger_plugin_interface.h:288
virtual void on_stop()
Notifies the plugin that the recorder is stopping.
Definition: trigger_plugin_interface.h:275
virtual void on_trigger(const TriggerContext &context)
Notifies the plugin that a trigger was accepted and a dump is about to run.
Definition: trigger_plugin_interface.h:277
virtual ~TriggerPluginInterface()=default
TriggerPluginInterface()=default
virtual void flush()
Drains any plugin-internal asynchronous work before the host unbinds or tears down.
Definition: trigger_plugin_interface.h:290
virtual void on_start()
Notifies the plugin that the recorder has started.
Definition: trigger_plugin_interface.h:273
virtual void on_dump_finished(const DumpResult &result)=0
Notifies the plugin that the dump file has been fully written and closed.
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
#define VLINK_PLUGIN_REGISTER(InterfaceType)
Declares a plugin's identity from the demangled name of its abstract interface.
Definition: plugin.h:347
One recorded or replayed message as it flows through the bag pipeline.
Definition: types.h:226
Describes the dump currently being written, delivered to on_dump_started() / on_frame().
Definition: trigger_plugin_interface.h:129
std::string reason
Trigger reason for this dump.
Definition: trigger_plugin_interface.h:130
std::string path
Output bag file path.
Definition: trigger_plugin_interface.h:131
int64_t start_timestamp
Wall-clock time of the window's first frame, in milliseconds.
Definition: trigger_plugin_interface.h:132
int64_t url_count
Number of URLs snapshotted into this dump (some may contribute 0 frames).
Definition: trigger_plugin_interface.h:133
Final outcome of a dump, delivered to on_dump_finished() / on_dump_failed().
Definition: trigger_plugin_interface.h:140
int64_t byte_count
Total payload bytes accepted by the writer.
Definition: trigger_plugin_interface.h:145
int64_t start_timestamp
Wall-clock time of the window's first frame, in milliseconds.
Definition: trigger_plugin_interface.h:147
int64_t duration_us
Wall-clock time spent writing the dump, in microseconds.
Definition: trigger_plugin_interface.h:148
int64_t frame_count
Snapshot frames accepted by the writer; a bag plugin may alter final output count.
Definition: trigger_plugin_interface.h:143
int64_t dropped_count
Retained for compatibility; a synchronous dump aborts on failure, so this stays 0.
Definition: trigger_plugin_interface.h:144
std::string error
Human-readable failure reason when success is false.
Definition: trigger_plugin_interface.h:150
int64_t url_count
Number of URLs snapshotted into this dump.
Definition: trigger_plugin_interface.h:146
std::string path
Output bag file path.
Definition: trigger_plugin_interface.h:142
bool success
true when the dump completed and the file was closed.
Definition: trigger_plugin_interface.h:149
std::string reason
Trigger reason for this dump.
Definition: trigger_plugin_interface.h:141
Describes an accepted trigger request, delivered to on_trigger().
Definition: trigger_plugin_interface.h:116
int64_t post_ms
Per-trigger post window override in ms (<0 => configured default).
Definition: trigger_plugin_interface.h:121
std::string out_file
Explicit output path requested (empty => auto-named).
Definition: trigger_plugin_interface.h:119
int64_t trigger_timestamp
Wall-clock time of the trigger instant, in microseconds.
Definition: trigger_plugin_interface.h:122
int64_t pre_ms
Per-trigger pre window override in ms (<0 => configured default).
Definition: trigger_plugin_interface.h:120
std::string name_hint
Requested output file-name hint (may be empty).
Definition: trigger_plugin_interface.h:118
std::string reason
Trigger reason (also written as the bag tag).
Definition: trigger_plugin_interface.h:117