Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mcap Namespace Reference

Namespaces

 internal
 

Classes

struct  Attachment
 An Attachment is an arbitrary file embedded in an MCAP file, including a name, media type, timestamps, and optional CRC. Attachment records are written in the Data section, outside of Chunks. More...
 
struct  AttachmentIndex
 Attachment Index records are found in the Summary section, providing summary information for a single Attachment. More...
 
class  BufferReader
 A "null" compressed reader that directly passes through uncompressed data. No internal buffers are allocated. More...
 
class  BufferWriter
 An in-memory IChunkWriter implementation backed by a growable buffer. More...
 
struct  Channel
 Describes a Channel that messages are written to. A Channel represents a single connection from a publisher to a topic, so each topic will have one Channel per publisher. Channels optionally reference a Schema, for message encodings that are not self-describing (e.g. JSON) or when schema information is available (e.g. JSONSchema). More...
 
struct  Chunk
 An collection of Schemas, Channels, and Messages that supports compression and indexing. More...
 
struct  ChunkIndex
 Chunk Index records are found in the Summary section, providing summary information for a single Chunk and pointing to each Message Index record associated with that Chunk. More...
 
struct  DataEnd
 The final record in the Data section, signaling the end of Data and beginning of Summary. Optionally contains a CRC of the entire Data section. More...
 
class  FileReader
 IReadable implementation wrapping a FILE* pointer created by fopen() and a read buffer. More...
 
class  FileStreamReader
 IReadable implementation wrapping a std::ifstream input file stream. More...
 
class  FileWriter
 Implements the IWritable interface used by McapWriter by wrapping a FILE* pointer created by fopen(). More...
 
struct  Footer
 The final record in an MCAP file (before the trailing magic byte sequence). Contains byte offsets from the start of the file to the Summary and Summary Offset sections, along with an optional CRC of the combined Summary and Summary Offset sections. A summaryStart and summaryOffsetStart of zero indicates no Summary section is available. More...
 
struct  Header
 Appears at the beginning of every MCAP file (after the magic byte sequence) and contains the recording profile (see https://github.com/foxglove/mcap/tree/main/docs/specification/profiles) and a string signature of the recording library. More...
 
class  IChunkWriter
 An abstract interface for writing Chunk data. Chunk data is buffered in memory and written to disk as a single record, to support optimal compression and calculating the final Chunk data size. More...
 
class  ICompressedReader
 An abstract interface for compressed readers. More...
 
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: More...
 
struct  IReadable
 An abstract interface for reading MCAP data. More...
 
class  IWritable
 An abstract interface for writing MCAP data. More...
 
struct  LinearMessageView
 An iterable view of Messages in an MCAP file. More...
 
struct  LoadParams
 
class  LZ4Reader
 ICompressedReader implementation that decompresses LZ4 (https://lz4.github.io/lz4/) data. More...
 
class  LZ4Writer
 An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an LZ4-compressed buffer. More...
 
class  McapReader
 Provides a read interface to an MCAP file. More...
 
class  McapWriter
 Provides a write interface to an MCAP file. More...
 
struct  McapWriterOptions
 Configuration options for McapWriter. More...
 
struct  Message
 A single Message published to a Channel. More...
 
struct  MessageIndex
 A list of timestamps to byte offsets for a single Channel. This record appears after each Chunk, one per Channel that appeared in that Chunk. More...
 
struct  MessageView
 Returned when iterating over Messages in a file, MessageView contains a reference to one Message, a pointer to its Channel, and an optional pointer to that Channel's Schema. The Channel pointer is guaranteed to be valid, while the Schema pointer may be null if the Channel references schema_id 0. More...
 
struct  Metadata
 Holds a named map of key/value strings containing arbitrary user data. Metadata records are found in the Data section, outside of Chunks. More...
 
struct  MetadataIndex
 Metadata Index records are found in the Summary section, providing summary information for a single Metadata record. More...
 
struct  ReadMessageOptions
 Options for reading messages out of an MCAP file. More...
 
struct  Record
 A generic Type-Length-Value record using a uint8 type and uint64 length. This is the generic form of all MCAP records. More...
 
struct  RecordOffset
 
struct  RecordReader
 A low-level interface for parsing MCAP-style TLV records from a data source. More...
 
struct  Schema
 Describes a schema used for message encoding and decoding and/or describing the shape of messages. One or more Channel records map to a single Schema. More...
 
struct  Statistics
 The Statistics record is found in the Summary section, providing counts and timestamp ranges for the entire file. More...
 
struct  Status
 Wraps a status code and string message carrying additional context. More...
 
class  StreamWriter
 Implements the IWritable interface used by McapWriter by wrapping a std::ostream stream. More...
 
struct  SummaryOffset
 Summary Offset records are found in the Summary Offset section. Records in the Summary section are grouped together, and for each record type found in the Summary section, a Summary Offset references the file offset and length where that type of Summary record can be found. More...
 
struct  TypedChunkReader
 
struct  TypedRecordReader
 A mid-level interface for parsing and validating MCAP records from a data source. More...
 
class  ZStdReader
 ICompressedReader implementation that decompresses Zstandard (https://facebook.github.io/zstd/) data. More...
 
class  ZStdWriter
 An in-memory IChunkWriter implementation that holds data in a temporary buffer before flushing to an ZStandard-compressed buffer. More...
 

Typedefs

using ByteArray = std::vector< std::byte >
 
using ByteOffset = uint64_t
 
using ChannelId = uint16_t
 
using ChannelPtr = std::shared_ptr< Channel >
 
using KeyValueMap = std::unordered_map< std::string, std::string >
 
using ProblemCallback = std::function< void(const Status &)>
 
using SchemaId = uint16_t
 
using SchemaPtr = std::shared_ptr< Schema >
 
using Timestamp = uint64_t
 

Enumerations

enum  Compression { Compression::None, Compression::Lz4, Compression::Zstd }
 Supported MCAP compression algorithms. More...
 
enum  CompressionLevel {
  CompressionLevel::Fastest, CompressionLevel::Fast, CompressionLevel::Default, CompressionLevel::Slow,
  CompressionLevel::Slowest
}
 Compression level to use when compression is enabled. Slower generally produces smaller files, at the expense of more CPU time. These levels map to different internal settings for each compression algorithm. More...
 
enum  OpCode : uint8_t {
  OpCode::Header = 0x01, OpCode::Footer = 0x02, OpCode::Schema = 0x03, OpCode::Channel = 0x04,
  OpCode::Message = 0x05, OpCode::Chunk = 0x06, OpCode::MessageIndex = 0x07, OpCode::ChunkIndex = 0x08,
  OpCode::Attachment = 0x09, OpCode::AttachmentIndex = 0x0A, OpCode::Statistics = 0x0B, OpCode::Metadata = 0x0C,
  OpCode::MetadataIndex = 0x0D, OpCode::SummaryOffset = 0x0E, OpCode::DataEnd = 0x0F
}
 MCAP record types. More...
 
enum  ReadSummaryMethod { ReadSummaryMethod::NoFallbackScan, ReadSummaryMethod::AllowFallbackScan, ReadSummaryMethod::ForceScan }
 
enum  StatusCode {
  StatusCode::Success = 0, StatusCode::NotOpen, StatusCode::InvalidSchemaId, StatusCode::InvalidChannelId,
  StatusCode::FileTooSmall, StatusCode::ReadFailed, StatusCode::MagicMismatch, StatusCode::InvalidFile,
  StatusCode::InvalidRecord, StatusCode::InvalidOpCode, StatusCode::InvalidChunkOffset, StatusCode::InvalidFooter,
  StatusCode::DecompressionFailed, StatusCode::DecompressionSizeMismatch, StatusCode::UnrecognizedCompression, StatusCode::OpenFailed,
  StatusCode::MissingStatistics, StatusCode::InvalidMessageReadOptions, StatusCode::NoMessageIndexesAvailable
}
 Status codes for MCAP readers and writers. More...
 

Functions

constexpr MCAP_PUBLIC std::string_view OpCodeString (OpCode opcode)
 Get the string representation of an OpCode. More...
 

Variables

constexpr uint64_t DefaultChunkSize = 1024 * 768
 
constexpr ByteOffset EndOffset = std::numeric_limits<ByteOffset>::max()
 
constexpr char LibraryVersion [] = MCAP_LIBRARY_VERSION
 
constexpr uint8_t Magic [] = {137, 77, 67, 65, 80, SpecVersion, 13, 10}
 
constexpr Timestamp MaxTime = std::numeric_limits<Timestamp>::max()
 
constexpr char SpecVersion = '0'
 

Typedef Documentation

◆ ByteArray

using mcap::ByteArray = typedef std::vector<std::byte>

Definition at line 23 of file types.hpp.

◆ ByteOffset

using mcap::ByteOffset = typedef uint64_t

Definition at line 21 of file types.hpp.

◆ ChannelId

using mcap::ChannelId = typedef uint16_t

Definition at line 19 of file types.hpp.

◆ ChannelPtr

using mcap::ChannelPtr = typedef std::shared_ptr<Channel>

Definition at line 176 of file types.hpp.

◆ KeyValueMap

using mcap::KeyValueMap = typedef std::unordered_map<std::string, std::string>

Definition at line 22 of file types.hpp.

◆ ProblemCallback

using mcap::ProblemCallback = typedef std::function<void(const Status&)>

Definition at line 24 of file types.hpp.

◆ SchemaId

using mcap::SchemaId = typedef uint16_t

Definition at line 18 of file types.hpp.

◆ SchemaPtr

using mcap::SchemaPtr = typedef std::shared_ptr<Schema>

Definition at line 175 of file types.hpp.

◆ Timestamp

using mcap::Timestamp = typedef uint64_t

Definition at line 20 of file types.hpp.

Enumeration Type Documentation

◆ Compression

enum mcap::Compression
strong

Supported MCAP compression algorithms.

Enumerator
None 
Lz4 
Zstd 

Definition at line 36 of file types.hpp.

◆ CompressionLevel

Compression level to use when compression is enabled. Slower generally produces smaller files, at the expense of more CPU time. These levels map to different internal settings for each compression algorithm.

Enumerator
Fastest 
Fast 
Default 
Slow 
Slowest 

Definition at line 47 of file types.hpp.

◆ OpCode

enum mcap::OpCode : uint8_t
strong

MCAP record types.

Enumerator
Header 
Footer 
Schema 
Channel 
Message 
Chunk 
MessageIndex 
ChunkIndex 
Attachment 
AttachmentIndex 
Statistics 
Metadata 
MetadataIndex 
SummaryOffset 
DataEnd 

Definition at line 58 of file types.hpp.

◆ ReadSummaryMethod

Enumerator
NoFallbackScan 

Parse the Summary section to produce seeking indexes and summary statistics. If the Summary section is not present or corrupt, a failure Status is returned and the seeking indexes and summary statistics are not populated.

AllowFallbackScan 

If the Summary section is missing or incomplete, allow falling back to reading the file sequentially to produce seeking indexes and summary statistics.

ForceScan 

Read the file sequentially from Header to DataEnd to produce seeking indexes and summary statistics.

Definition at line 19 of file reader.hpp.

◆ StatusCode

enum mcap::StatusCode
strong

Status codes for MCAP readers and writers.

Enumerator
Success 
NotOpen 
InvalidSchemaId 
InvalidChannelId 
FileTooSmall 
ReadFailed 
MagicMismatch 
InvalidFile 
InvalidRecord 
InvalidOpCode 
InvalidChunkOffset 
InvalidFooter 
DecompressionFailed 
DecompressionSizeMismatch 
UnrecognizedCompression 
OpenFailed 
MissingStatistics 
InvalidMessageReadOptions 
NoMessageIndexesAvailable 

Definition at line 10 of file errors.hpp.

Function Documentation

◆ OpCodeString()

constexpr MCAP_PUBLIC std::string_view mcap::OpCodeString ( OpCode  opcode)
constexpr

Get the string representation of an OpCode.

Variable Documentation

◆ DefaultChunkSize

constexpr uint64_t mcap::DefaultChunkSize = 1024 * 768
constexpr

Definition at line 29 of file types.hpp.

◆ EndOffset

constexpr ByteOffset mcap::EndOffset = std::numeric_limits<ByteOffset>::max()
constexpr

Definition at line 30 of file types.hpp.

◆ LibraryVersion

constexpr char mcap::LibraryVersion[] = MCAP_LIBRARY_VERSION
constexpr

Definition at line 27 of file types.hpp.

◆ Magic

constexpr uint8_t mcap::Magic[] = {137, 77, 67, 65, 80, SpecVersion, 13, 10}
constexpr

Definition at line 28 of file types.hpp.

◆ MaxTime

constexpr Timestamp mcap::MaxTime = std::numeric_limits<Timestamp>::max()
constexpr

Definition at line 31 of file types.hpp.

◆ SpecVersion

constexpr char mcap::SpecVersion = '0'
constexpr

Definition at line 26 of file types.hpp.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52