struct ReadMessageOptions

Declaration

struct ReadMessageOptions { /* full declaration omitted */ };

Description

Options for reading messages out of an MCAP file.

Declared at: mcap/include/mcap/reader.hpp:247

Member Variables

public mcap::Timestamp startTime = 0
public mcap::Timestamp endTime = MaxTime
public std::function<bool(std::string_view)> topicFilter
public mcap::ReadMessageOptions::ReadOrder readOrder = ReadOrder::FileOrder

Method Overview

Methods

ReadMessageOptions(
    mcap::Timestamp startingAtTime,
    mcap::Timestamp endingBeforeTime)

Description

Equivalent to `startingAt(startingAtTime).endingBefore(endingBeforeTime)`.

Declared at: mcap/include/mcap/reader.hpp:344

Parameters

mcap::Timestamp startingAtTime
mcap::Timestamp endingBeforeTime

ReadMessageOptions()

Declared at: mcap/include/mcap/reader.hpp:348

ReadMessageOptions(
    const mcap::ReadMessageOptions&)

Declared at: mcap/include/mcap/reader.hpp:349

Parameters

const mcap::ReadMessageOptions&

ReadMessageOptions(mcap::ReadMessageOptions&&)

Declared at: mcap/include/mcap/reader.hpp:350

Parameters

mcap::ReadMessageOptions&&

mcap::ReadMessageOptions& endingAt(
    mcap::Timestamp time)

Description

Limit reading to messages with log timestamps at or before this time (inclusive upper bound). `endingAt(MaxTime)` means no upper bound. Replaces any previously-set upper bound.

Declared at: mcap/include/mcap/reader.hpp:292

Parameters

mcap::Timestamp time

mcap::ReadMessageOptions& endingBefore(
    mcap::Timestamp time)

Description

Limit reading to messages with log timestamps strictly before this time (exclusive upper bound). Replaces any previously-set upper bound.

Declared at: mcap/include/mcap/reader.hpp:301

Parameters

mcap::Timestamp time

bool includesLogTime(
    mcap::Timestamp logTime) const

Description

Whether a message logged at `logTime` falls inside the requested time range.

Declared at: mcap/include/mcap/reader.hpp:309

Parameters

mcap::Timestamp logTime

bool overlapsLogTimes(mcap::Timestamp first,
                      mcap::Timestamp last) const

Description

Whether any log time in the closed interval [`first`, `last`] falls inside the requested time range. Readers use it to skip chunks.

Declared at: mcap/include/mcap/reader.hpp:316

Parameters

mcap::Timestamp first
mcap::Timestamp last

mcap::ReadMessageOptions& startingAfter(
    mcap::Timestamp time)

Description

Limit reading to messages with log timestamps strictly after this time (exclusive lower bound). `startingAfter(MaxTime)` matches nothing: a valid empty query on its own or with `endingAt(MaxTime)`, a crossed range with any other upper bound. Replaces any previously-set lower bound.

Declared at: mcap/include/mcap/reader.hpp:282

Parameters

mcap::Timestamp time

mcap::ReadMessageOptions& startingAt(
    mcap::Timestamp time)

Description

Limit reading to messages with log timestamps at or after this time (inclusive lower bound). Replaces any previously-set lower bound.

Declared at: mcap/include/mcap/reader.hpp:271

Parameters

mcap::Timestamp time

mcap::Status validate() const

Description

Validate the configuration. A crossed time range is an error; an empty one is not.

Declared at: mcap/include/mcap/reader.hpp:359

~ReadMessageOptions()

Declared at: mcap/include/mcap/reader.hpp:353