130 #include "../base/functional.h"
131 #include "../base/plugin.h"
132 #include "../impl/types.h"
298 virtual void flush();
Abstract plugin base shared by bag playback and bag recording.
Definition: bag_plugin_interface.h:148
void bind_direction(Direction direction)
Records the binding direction so the plugin can branch on read vs write.
Definition: bag_plugin_interface.h:325
Direction get_direction() const
Returns the side this plugin is currently bound to.
Definition: bag_plugin_interface.h:327
virtual bool convert_url_meta(std::string &url, std::string &ser_type, SchemaType &schema_type)
Rewrites or filters a stored URL before playback begins (read side).
Definition: bag_plugin_interface.h:331
virtual void flush()
Drains any internally-buffered frames downstream before the host unbinds and tears down.
Definition: bag_plugin_interface.h:344
virtual ~BagPluginInterface()=default
virtual void on_read(const Frame &frame)
Intercepts a replayed frame on its way to the user (read side).
Definition: bag_plugin_interface.h:340
BagPluginInterface()=default
void do_callback(const Frame &frame)
Forwards one frame downstream through the registered sink.
Definition: bag_plugin_interface.h:346
FrameCallback Callback
Forwarding sink used by do_callback() to re-emit a frame downstream.
Definition: bag_plugin_interface.h:185
void register_callback(Callback &&callback)
Stores the forwarding sink used by do_callback().
Definition: bag_plugin_interface.h:329
virtual VersionInfo get_version_info() const =0
Returns the build identity used by the host for logging and diagnostics.
virtual void on_write(const Frame &frame)
Intercepts a frame before it is persisted (write side).
Definition: bag_plugin_interface.h:342
Direction
Identifies whether the plugin is bound to a reader or a writer.
Definition: bag_plugin_interface.h:160
@ kWrite
Bound to a BagWriter; the plugin forwards frames before they are persisted.
Definition: bag_plugin_interface.h:162
@ kRead
Bound to a BagReader; the plugin forwards replayed frames.
Definition: bag_plugin_interface.h:161
Direction direction_
Definition: bag_plugin_interface.h:313
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:134
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:207
MoveFunction< void(const Frame &)> FrameCallback
Frame sink reused by every bag frame interface.
Definition: types.h:247
#define VLINK_PLUGIN_REGISTER(InterfaceType)
Declares a plugin's identity from the demangled name of its abstract interface.
Definition: plugin.h:345
Build identity returned by get_version_info().
Definition: bag_plugin_interface.h:169
std::string name
Human-readable plugin display name.
Definition: bag_plugin_interface.h:170
std::string timestamp
Build timestamp string.
Definition: bag_plugin_interface.h:172
std::string version
Semantic version (e.g. "1.2.3").
Definition: bag_plugin_interface.h:171
std::string tag
Source-control tag or label.
Definition: bag_plugin_interface.h:173
std::string commit_id
Source-control commit hash.
Definition: bag_plugin_interface.h:174
One recorded or replayed message as it flows through the bag pipeline.
Definition: types.h:230