|
VLink
2.0.0
A high-performance communication middleware
|
Abstract player for VLink bag recordings with seek, loop and rate control. More...
#include <cstdint>#include <future>#include <memory>#include <string>#include <string_view>#include <unordered_map>#include <unordered_set>#include <vector>#include "../base/functional.h"#include "../base/macros.h"#include "../base/message_loop.h"#include "../impl/types.h"#include "./bag_plugin_interface.h"Go to the source code of this file.
Classes | |
| class | vlink::BagReader |
Format-agnostic VLink bag player driven by an internal MessageLoop. More... | |
| struct | vlink::BagReader::Info |
| Aggregated metadata extracted from the bag header, summary and URL index. More... | |
| struct | vlink::BagReader::Info::UrlMeta |
Per-URL accounting entry recorded inside Info::url_metas. More... | |
| struct | vlink::BagReader::Config |
Playback parameters consumed by play(). More... | |
Namespaces | |
| vlink | |
Abstract player for VLink bag recordings with seek, loop and rate control.
BagReader is the polymorphic base for VLink offline log playback. It owns a private MessageLoop thread, opens a bag file produced by BagWriter, and replays the stored messages back to user-supplied callbacks honouring their original timing. Concrete subclasses provide format-specific I/O: VDBReader for the SQLite-backed .vdb container and VCAPReader for the MCAP-based .vcap container. create() chooses the right one from the file suffix.
Supported formats and behaviour summary:
| Suffix | Concrete reader | Storage | Index source |
|---|---|---|---|
.vdb / .vdbx | VDBReader | SQLite | SQLite tables (elapsed/URL) |
.vcap / .vcapx | VCAPReader | MCAP | MCAP summary + chunk index |
Internal playback state machine:
* play(cfg) pause() * +------------+ -------> +-----------+ -------> +----------+ * | kStopped | | kPlaying | | kPaused | * +------------+ <------- +-----------+ <------- +----------+ * stop() / resume() / pause_to_next() * end-of-bag *
Playback features:
Config.jump() seeks to an arbitrary recording timestamp and may force-resume playback.Config::filter_urls applies after plugin URL remapping.check() / reindex() / fix() run asynchronously and report their outcome through std::future<bool>.BagPluginInterface may rename URLs, override serialisation types and intercept individual replayed messages.async_run() before play(); the loop thread must be alive to dispatch frames. Output callback timestamps are in microseconds, while Config::begin_time and Config::end_time are expressed in milliseconds.