VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
database_writer.h 文件参考

Concrete BagWriter implementation for the SQLite-backed VLink bag format. 更多...

#include <memory>
#include <string>
#include "./bag_writer.h"
database_writer.h 的引用(Include)关系图:

浏览该文件的源代码.

 Concrete SQLite-backed bag file recorder with transactional write caching. 更多...

命名空间

详细描述

Concrete BagWriter implementation for the SQLite-backed VLink bag format.

DatabaseWriter records VLink messages to a SQLite .vdb file. It extends BagWriter with transactional write caching (WAL mode, batch commit), optional VACUUM optimisation on exit, and in-place schema embedding for Protobuf introspection.

Internally, messages are accumulated in a memory cache and committed in batches to reduce SQLite write overhead. Cache parameters are configurable via BagWriter::Config.

Usage
cfg.wal_mode = true;
auto writer = vlink::BagWriter::create("/data/recording.vdb", cfg);
// or explicitly:
auto writer = std::make_shared<vlink::DatabaseWriter>("/data/recording.vdb", cfg);
writer->async_run();
writer->push("dds://my/topic", "demo.proto.PointCloud", vlink::SchemaType::kProtobuf,
参见
BagWriter, McapWriter