pjmsg_mcap_wrapper
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
mcap::ReadMessageOptions Struct Reference

Detailed Description

Options for reading messages out of an MCAP file.

Definition at line 235 of file reader.hpp.

#include <reader.hpp>

Public Types

enum struct  ReadOrder {
  FileOrder ,
  LogTimeOrder ,
  ReverseLogTimeOrder
}
 

Public Member Functions

 ReadMessageOptions (Timestamp start, Timestamp end)
 
 ReadMessageOptions ()=default
 
Status validate () const
 validate the configuration.
 

Public Attributes

Timestamp startTime = 0
 Only messages with log timestamps greater or equal to startTime will be included.
 
Timestamp endTime = MaxTime
 Only messages with log timestamps less than endTime will be included.
 
std::function< bool(std::string_view)> topicFilter
 If provided, topicFilter is called on all topics found in the MCAP file. If topicFilter returns true for a given channel, messages from that channel will be included. if not provided, messages from all channels are provided.
 
ReadOrder readOrder = ReadOrder::FileOrder
 Set the expected order that messages should be returned in. if readOrder == FileOrder, messages will be returned in the order they appear in the MCAP file. if readOrder == LogTimeOrder, messages will be returned in ascending log time order. if readOrder == ReverseLogTimeOrder, messages will be returned in descending log time order.
 

Member Enumeration Documentation

◆ ReadOrder

Enumerator
FileOrder 
LogTimeOrder 
ReverseLogTimeOrder 

Definition at line 251 of file reader.hpp.

Constructor & Destructor Documentation

◆ ReadMessageOptions() [1/2]

mcap::ReadMessageOptions::ReadMessageOptions ( Timestamp  start,
Timestamp  end 
)
inline

Definition at line 260 of file reader.hpp.

◆ ReadMessageOptions() [2/2]

mcap::ReadMessageOptions::ReadMessageOptions ( )
default

Member Function Documentation

◆ validate()

Status mcap::ReadMessageOptions::validate ( ) const

validate the configuration.

Definition at line 1792 of file reader.inl.

Member Data Documentation

◆ endTime

Timestamp mcap::ReadMessageOptions::endTime = MaxTime

Only messages with log timestamps less than endTime will be included.

Definition at line 244 of file reader.hpp.

◆ readOrder

ReadOrder mcap::ReadMessageOptions::readOrder = ReadOrder::FileOrder

Set the expected order that messages should be returned in. if readOrder == FileOrder, messages will be returned in the order they appear in the MCAP file. if readOrder == LogTimeOrder, messages will be returned in ascending log time order. if readOrder == ReverseLogTimeOrder, messages will be returned in descending log time order.

Definition at line 258 of file reader.hpp.

◆ startTime

Timestamp mcap::ReadMessageOptions::startTime = 0

Only messages with log timestamps greater or equal to startTime will be included.

Definition at line 240 of file reader.hpp.

◆ topicFilter

std::function<bool(std::string_view)> mcap::ReadMessageOptions::topicFilter

If provided, topicFilter is called on all topics found in the MCAP file. If topicFilter returns true for a given channel, messages from that channel will be included. if not provided, messages from all channels are provided.

Definition at line 250 of file reader.hpp.


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