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

Concrete MCAP-format BagReader implementation with index-driven seek. 更多...

#include <vcap_reader.h>

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

Public 成员函数

 VCAPReader (const std::string &path, bool read_only=true, bool try_to_fix=false)
 Opens an MCAP file for playback. 更多...
 
 ~VCAPReader () override
 Stops playback and releases the MCAP file handle. 更多...
 
void bind_plugin_interface (const std::shared_ptr< BagPluginInterface > &plugin_interface) override
 Attaches a BagPluginInterface for custom URL or type rewriting. 更多...
 
void register_status_callback (StatusCallback &&status_callback) override
 Registers a callback invoked on every playback state transition. 更多...
 
void register_ready_callback (ReadyCallback &&ready_callback) override
 Registers a callback fired once the file is open, parsed, and ready to play. 更多...
 
void register_finish_callback (FinishCallback &&finish_callback) override
 Registers a callback fired when playback ends naturally or is interrupted. 更多...
 
void register_output_callback (OutputCallback &&output_callback) override
 Registers the message-delivery callback consumed during playback. 更多...
 
void play (const Config &config) override
 Starts playback with the given configuration. 更多...
 
void stop () override
 Stops playback and rewinds to the recording start. 更多...
 
void pause () override
 Pauses playback at the current position. 更多...
 
void resume () override
 Resumes paused playback from the current position. 更多...
 
void pause_to_next () override
 Emits one more message and then pauses again. 更多...
 
void jump (int64_t begin_time, double rate, int times, bool force_to_play=false) override
 Seeks to begin_time and resumes playback at the new position. 更多...
 
std::future< bool > check () override
 Verifies the integrity of the MCAP file asynchronously. 更多...
 
std::future< bool > reindex () override
 Unsupported MCAP reindex operation. 更多...
 
std::future< bool > fix (bool rebuild=false) override
 Unsupported MCAP repair operation. 更多...
 
void tag (const std::string &tag_name) override
 Updates the .vcapx manifest tag. Single .vcap files are left untouched. 更多...
 
int64_t get_timestamp () const override
 Returns the current playback cursor in milliseconds. 更多...
 
int64_t get_real_timestamp () const override
 Returns the timestamp of the last delivered message. 更多...
 
Status get_status () const override
 Returns the playback status. 更多...
 
const Infoget_info () const override
 Returns the bag metadata populated when the file was opened. 更多...
 
std::vector< SchemaDatadetect_schema () override
 Enumerates every schema embedded in the MCAP file. 更多...
 
bool is_split_mode () const override
 Reports whether the bag is split across multiple .vcap files. 更多...
 
int get_split_index () const override
 Returns the index of the split part currently under playback. 更多...
 
bool is_jumping () const override
 Reports whether a jump() seek is currently being processed. 更多...
 

Protected 成员函数

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. 更多...
 
bool do_open_cursor (const Config &config) override
 
bool do_read_next (Frame &out, bool &is_error) override
 

额外继承的成员函数

 Coarse playback state observable through get_status(). 更多...
 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 BagReader implementation with index-driven seek.

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

构造及析构函数说明

◆ VCAPReader()

vlink::VCAPReader::VCAPReader ( const std::string &  path,
bool  read_only = true,
bool  try_to_fix = false 
)
explicit

Opens an MCAP file for playback.

参数
pathFilesystem path of the .vcap or .vcapx file.
read_onlytrue blocks any in-place modification (default).
try_to_fixtrue enables a fallback summary scan when the indexed summary is unreadable.

◆ ~VCAPReader()

vlink::VCAPReader::~VCAPReader ( )
override

Stops playback and releases the MCAP file handle.

成员函数说明

◆ bind_plugin_interface()

void vlink::VCAPReader::bind_plugin_interface ( const std::shared_ptr< BagPluginInterface > &  plugin_interface)
overridevirtual

Attaches a BagPluginInterface for custom URL or type rewriting.

参数
plugin_interfacePlugin instance; pass nullptr to detach.

重载 vlink::BagReader .

◆ check()

std::future<bool> vlink::VCAPReader::check ( )
overridevirtual

Verifies the integrity of the MCAP file asynchronously.

返回
Future resolving to true when the file passes the integrity check.

实现了 vlink::BagReader.

◆ detect_schema()

std::vector<SchemaData> vlink::VCAPReader::detect_schema ( )
overridevirtual

Enumerates every schema embedded in the MCAP file.

返回
Vector of SchemaData descriptors.

实现了 vlink::BagReader.

◆ do_open_cursor()

bool vlink::VCAPReader::do_open_cursor ( const Config config)
overrideprotectedvirtual

重载 vlink::BagReader .

◆ do_read_next()

bool vlink::VCAPReader::do_read_next ( Frame out,
bool &  is_error 
)
overrideprotectedvirtual

重载 vlink::BagReader .

◆ fix()

std::future<bool> vlink::VCAPReader::fix ( bool  rebuild = false)
overridevirtual

Unsupported MCAP repair operation.

参数
rebuildIgnored.
返回
Future that always resolves to false.

实现了 vlink::BagReader.

◆ get_info()

const Info& vlink::VCAPReader::get_info ( ) const
overridevirtual

Returns the bag metadata populated when the file was opened.

返回
Const reference to the Info struct.

实现了 vlink::BagReader.

◆ get_max_task_count()

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

Returns the maximum queue depth.

返回
kMaxTaskSize (10000) by default.

重载 vlink::MessageLoop .

◆ get_real_timestamp()

int64_t vlink::VCAPReader::get_real_timestamp ( ) const
overridevirtual

Returns the timestamp of the last delivered message.

返回
Last data timestamp in milliseconds, or 0 when stopped.

实现了 vlink::BagReader.

◆ get_split_index()

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

Returns the index of the split part currently under playback.

返回
Zero-based split index.

实现了 vlink::BagReader.

◆ get_status()

Status vlink::VCAPReader::get_status ( ) const
overridevirtual

Returns the playback status.

返回
One of kStopped, kPaused, or kPlaying.

实现了 vlink::BagReader.

◆ get_timestamp()

int64_t vlink::VCAPReader::get_timestamp ( ) const
overridevirtual

Returns the current playback cursor in milliseconds.

返回
Position relative to the recording start.

实现了 vlink::BagReader.

◆ is_jumping()

bool vlink::VCAPReader::is_jumping ( ) const
overridevirtual

Reports whether a jump() seek is currently being processed.

返回
true while a seek is in flight.

实现了 vlink::BagReader.

◆ is_split_mode()

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

Reports whether the bag is split across multiple .vcap files.

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

实现了 vlink::BagReader.

◆ jump()

void vlink::VCAPReader::jump ( int64_t  begin_time,
double  rate,
int  times,
bool  force_to_play = false 
)
overridevirtual

Seeks to begin_time and resumes playback at the new position.

参数
begin_timeTarget timestamp in milliseconds, relative to recording start.
ratePlayback rate multiplier applied after the seek.
timesNumber of loop iterations after the jump.
force_to_playtrue forces play state even if currently paused.

实现了 vlink::BagReader.

◆ on_begin()

void vlink::VCAPReader::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::VCAPReader::on_end ( )
overrideprotectedvirtual

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

Subclasses override to perform per-thread cleanup.

重载 vlink::MessageLoop .

◆ pause()

void vlink::VCAPReader::pause ( )
overridevirtual

Pauses playback at the current position.

实现了 vlink::BagReader.

◆ pause_to_next()

void vlink::VCAPReader::pause_to_next ( )
overridevirtual

Emits one more message and then pauses again.

实现了 vlink::BagReader.

◆ play()

void vlink::VCAPReader::play ( const Config config)
overridevirtual

Starts playback with the given configuration.

参数
configPlayback configuration (start / end times, rate, filters, loop count).

实现了 vlink::BagReader.

◆ register_finish_callback()

void vlink::VCAPReader::register_finish_callback ( FinishCallback &&  finish_callback)
overridevirtual

Registers a callback fired when playback ends naturally or is interrupted.

参数
finish_callbackReceives a flag indicating whether playback was interrupted.

重载 vlink::BagReader .

◆ register_output_callback()

void vlink::VCAPReader::register_output_callback ( OutputCallback &&  output_callback)
overridevirtual

Registers the message-delivery callback consumed during playback.

参数
output_callbackInvoked for each replayed message.

重载 vlink::BagReader .

◆ register_ready_callback()

void vlink::VCAPReader::register_ready_callback ( ReadyCallback &&  ready_callback)
overridevirtual

Registers a callback fired once the file is open, parsed, and ready to play.

参数
ready_callbackInvoked when the reader transitions out of opening state.

重载 vlink::BagReader .

◆ register_status_callback()

void vlink::VCAPReader::register_status_callback ( StatusCallback &&  status_callback)
overridevirtual

Registers a callback invoked on every playback state transition.

参数
status_callbackReceives the new Status value.

重载 vlink::BagReader .

◆ reindex()

std::future<bool> vlink::VCAPReader::reindex ( )
overridevirtual

Unsupported MCAP reindex operation.

返回
Future that always resolves to false.

实现了 vlink::BagReader.

◆ resume()

void vlink::VCAPReader::resume ( )
overridevirtual

Resumes paused playback from the current position.

实现了 vlink::BagReader.

◆ stop()

void vlink::VCAPReader::stop ( )
overridevirtual

Stops playback and rewinds to the recording start.

实现了 vlink::BagReader.

◆ tag()

void vlink::VCAPReader::tag ( const std::string &  tag_name)
overridevirtual

Updates the .vcapx manifest tag. Single .vcap files are left untouched.

参数
tag_nameNew tag string.

实现了 vlink::BagReader.


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