Struct IndexedMessageReader

Nested Relationships

Nested Types

Struct Documentation

struct IndexedMessageReader

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:

  • noChunking: false

  • noMessageIndex: false

  • noSummary: false

Public 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.

Returns:

true if a message was found.

Returns:

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() const

gets the status of the reader.

Returns:

Status