Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mcap::IndexedMessageReader Struct Reference

Uses message indices to read messages out of an MCAP in log time order. The underlying MCAP must be chunked, with a summary section and message indexes. The required McapWriterOptions are: More...

#include <reader.hpp>

Classes

struct  ChunkSlot
 

Public Member Functions

 IndexedMessageReader (McapReader &reader, const ReadMessageOptions &options, const std::function< void(const Message &, RecordOffset)> onMessage)
 
bool next ()
 reads the next message out of the MCAP. More...
 
Status status () const
 gets the status of the reader. More...
 

Private Member Functions

void decompressChunk (const Chunk &chunk, ChunkSlot &slot)
 
size_t findFreeChunkSlot ()
 

Private Attributes

std::vector< ChunkSlotchunkSlots_
 
LZ4Reader lz4Reader_
 
McapReadermcapReader_
 
std::function< void(const Message &, RecordOffset)> onMessage_
 
ReadMessageOptions options_
 
internal::ReadJobQueue queue_
 
RecordReader recordReader_
 
std::unordered_set< ChannelIdselectedChannels_
 
Status status_
 

Detailed Description

Uses message indices to read messages out of an MCAP in log time order. The underlying MCAP must be chunked, with a summary section and message indexes. The required McapWriterOptions are:

Definition at line 598 of file reader.hpp.

Constructor & Destructor Documentation

◆ IndexedMessageReader()

mcap::IndexedMessageReader::IndexedMessageReader ( McapReader reader,
const ReadMessageOptions options,
const std::function< void(const Message &, RecordOffset)>  onMessage 
)

Member Function Documentation

◆ decompressChunk()

void mcap::IndexedMessageReader::decompressChunk ( const Chunk chunk,
ChunkSlot slot 
)
private

◆ findFreeChunkSlot()

size_t mcap::IndexedMessageReader::findFreeChunkSlot ( )
private

◆ next()

bool mcap::IndexedMessageReader::next ( )

reads the next message out of the MCAP.

Returns
true if a message was found.
false if no more messages are to be read. If there was some error reading the MCAP, status() will return a non-Success status.

◆ status()

Status mcap::IndexedMessageReader::status ( ) const

gets the status of the reader.

Returns
Status

Member Data Documentation

◆ chunkSlots_

std::vector<ChunkSlot> mcap::IndexedMessageReader::chunkSlots_
private

Definition at line 635 of file reader.hpp.

◆ lz4Reader_

LZ4Reader mcap::IndexedMessageReader::lz4Reader_
private

Definition at line 630 of file reader.hpp.

◆ mcapReader_

McapReader& mcap::IndexedMessageReader::mcapReader_
private

Definition at line 628 of file reader.hpp.

◆ onMessage_

std::function<void(const Message&, RecordOffset)> mcap::IndexedMessageReader::onMessage_
private

Definition at line 633 of file reader.hpp.

◆ options_

ReadMessageOptions mcap::IndexedMessageReader::options_
private

Definition at line 631 of file reader.hpp.

◆ queue_

internal::ReadJobQueue mcap::IndexedMessageReader::queue_
private

Definition at line 634 of file reader.hpp.

◆ recordReader_

RecordReader mcap::IndexedMessageReader::recordReader_
private

Definition at line 629 of file reader.hpp.

◆ selectedChannels_

std::unordered_set<ChannelId> mcap::IndexedMessageReader::selectedChannels_
private

Definition at line 632 of file reader.hpp.

◆ status_

Status mcap::IndexedMessageReader::status_
private

Definition at line 627 of file reader.hpp.


The documentation for this struct was generated from the following file:


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:31