VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
mcap_reader.h File Reference

Concrete BagReader implementation for the MCAP bag file format. More...

#include <future>
#include <memory>
#include <string>
#include <vector>
#include "./bag_reader.h"
Include dependency graph for mcap_reader.h:

Go to the source code of this file.

Classes

 Concrete MCAP-format bag file player. More...

Namespaces

Detailed Description

Concrete BagReader implementation for the MCAP bag file format.

McapReader reads bag files in the MCAP format (.vcap / .vcapx extension) and inherits all playback, seeking, and integrity-check capabilities from BagReader.

MCAP (Message Capture Archive Protocol) is a modular, indexed binary format designed for efficient random-access playback. It supports channel-level schemas, checksums, and multiple compression codecs.

Usage
auto reader = vlink::BagReader::create("/data/recording.vcap");
// or explicitly:
auto reader = std::make_shared<vlink::McapReader>("/data/recording.vcap");
reader->register_output_callback([](int64_t ts, const std::string& url,
vlink::ActionType action, const vlink::Bytes& data) {
// process message
});
reader->async_run();
reader->play({});
See also
BagReader, DatabaseReader