VLink  2.0.0
A high-performance communication middleware
vlink::VCAPWriter类 参考final

Concrete MCAP-format BagWriter implementation with optional Zstd compression. 更多...

#include <vcap_writer.h>

类 vlink::VCAPWriter 继承关系图:
vlink::VCAPWriter 的协作图:

Public 成员函数

 VCAPWriter (const std::string &path, const Config &config={})
 Opens or creates an MCAP file for recording. 更多...
 
 ~VCAPWriter () override
 Finalises the MCAP footer and flushes outstanding writes. 更多...
 
void register_split_callback (SplitCallback &&callback, bool before) override
 Registers a callback invoked at each file-split boundary. 更多...
 
void register_schema_callback (SchemaCallback &&callback) override
 Registers a resolver that maps a serialisation-type string to SchemaData. 更多...
 
bool push_schema (const SchemaData &schema_data, bool immediate=false) override
 Embeds schema_data in the MCAP file for offline introspection. 更多...
 
bool is_dumping () const override
 Returns the current value of the internal dumping flag. 更多...
 
bool is_split_mode () const override
 Reports whether split-file recording is active. 更多...
 
int get_split_index () const override
 Returns the index of the split part currently being written. 更多...
 

Protected 成员函数

int64_t record (const Frame &frame, bool immediate) override
 
int64_t get_record_timestamp () const override
 
size_t get_max_task_count () const override
 Returns the maximum queue depth. 更多...
 
void on_begin () override
 Hook invoked once on the loop thread before the first task runs. 更多...
 
void on_end () override
 Hook invoked once on the loop thread after the last task runs. 更多...
 

额外继承的成员函数

 Compression codec selector understood by the writer backends. 更多...
 Internal queue implementation type. 更多...
 Back-pressure strategy applied when the bounded queue is at capacity. 更多...
 Built-in priority levels for kPriorityType loops; higher values dispatch first. 更多...

详细描述

Concrete MCAP-format BagWriter implementation with optional Zstd compression.

Prefer BagWriter::create() for format-agnostic instantiation; instantiate this class directly when an MCAP-specific feature is required.

构造及析构函数说明

◆ VCAPWriter()

vlink::VCAPWriter::VCAPWriter ( const std::string &  path,
const Config config = {} 
)
explicit

Opens or creates an MCAP file for recording.

参数
pathFilesystem path of the .vcap or .vcapx target.
configRecording configuration (split policy, compression, etc.).

◆ ~VCAPWriter()

vlink::VCAPWriter::~VCAPWriter ( )
override

Finalises the MCAP footer and flushes outstanding writes.

成员函数说明

◆ get_max_task_count()

size_t vlink::VCAPWriter::get_max_task_count ( ) const
overrideprotectedvirtual

Returns the maximum queue depth.

返回
kMaxTaskSize (10000) by default.

重载 vlink::MessageLoop .

◆ get_record_timestamp()

int64_t vlink::VCAPWriter::get_record_timestamp ( ) const
overrideprotectedvirtual

实现了 vlink::BagWriter.

◆ get_split_index()

int vlink::VCAPWriter::get_split_index ( ) const
overridevirtual

Returns the index of the split part currently being written.

返回
Zero-based split index.

实现了 vlink::BagWriter.

◆ is_dumping()

bool vlink::VCAPWriter::is_dumping ( ) const
overridevirtual

Returns the current value of the internal dumping flag.

返回
true while messages are actively being persisted.

实现了 vlink::BagWriter.

◆ is_split_mode()

bool vlink::VCAPWriter::is_split_mode ( ) const
overridevirtual

Reports whether split-file recording is active.

返回
true when emitting a .vcapx manifest with multiple parts.

实现了 vlink::BagWriter.

◆ on_begin()

void vlink::VCAPWriter::on_begin ( )
overrideprotectedvirtual

Hook invoked once on the loop thread before the first task runs.

Subclasses override to perform per-thread initialisation.

重载 vlink::MessageLoop .

◆ on_end()

void vlink::VCAPWriter::on_end ( )
overrideprotectedvirtual

Hook invoked once on the loop thread after the last task runs.

Subclasses override to perform per-thread cleanup.

重载 vlink::MessageLoop .

◆ push_schema()

bool vlink::VCAPWriter::push_schema ( const SchemaData schema_data,
bool  immediate = false 
)
overridevirtual

Embeds schema_data in the MCAP file for offline introspection.

参数
schema_dataSchema descriptor to embed.
immediatetrue merges synchronously; false enqueues the write.
返回
false only when an immediate merge failed.

实现了 vlink::BagWriter.

◆ record()

int64_t vlink::VCAPWriter::record ( const Frame frame,
bool  immediate 
)
overrideprotectedvirtual

实现了 vlink::BagWriter.

◆ register_schema_callback()

void vlink::VCAPWriter::register_schema_callback ( SchemaCallback &&  callback)
overridevirtual

Registers a resolver that maps a serialisation-type string to SchemaData.

参数
callbackFunction consulted before writing a channel record.

实现了 vlink::BagWriter.

◆ register_split_callback()

void vlink::VCAPWriter::register_split_callback ( SplitCallback &&  callback,
bool  before 
)
overridevirtual

Registers a callback invoked at each file-split boundary.

参数
callbackReceives (split_index, filename) before or after the split.
beforetrue fires before the new file is opened; false fires after.

实现了 vlink::BagWriter.


该类的文档由以下文件生成: