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

Detailed Description

Configuration options for McapWriter.

Definition at line 21 of file writer.hpp.

#include <writer.hpp>

Public Member Functions

 McapWriterOptions (const std::string_view profile)
 

Public Attributes

bool noChunkCRC = false
 Disable CRC calculations for Chunks.
 
bool noAttachmentCRC = false
 Disable CRC calculations for Attachments.
 
bool enableDataCRC = false
 Enable CRC calculations for all records in the data section.
 
bool noSummaryCRC = false
 Disable CRC calculations for the summary section.
 
bool noChunking = false
 Do not write Chunks to the file, instead writing Schema, Channel, and Message records directly into the Data section.
 
bool noMessageIndex = false
 Do not write Message Index records to the file. If noMessageIndex=true and noChunkIndex=false, Chunk Index records will still be written to the Summary section, providing a coarse message index.
 
bool noSummary = false
 Do not write Summary or Summary Offset sections to the file, placing the Footer record immediately after DataEnd. This can provide some speed boost to file writing and produce smaller files, at the expense of requiring a conversion process later if fast summarization or indexed access is desired.
 
uint64_t chunkSize = DefaultChunkSize
 Target uncompressed Chunk payload size in bytes. Once a Chunk's uncompressed data is about to exceed this size, the Chunk will be compressed (if enabled) and written to disk. Note that this is a 'soft' ceiling as some Chunks could exceed this size due to either indexing data or when a single message is larger than chunkSize, in which case, the Chunk will contain only this one large message. This option is ignored if noChunking=true.
 
Compression compression = Compression::Zstd
 Compression algorithm to use when writing Chunks. This option is ignored if noChunking=true.
 
CompressionLevel compressionLevel = CompressionLevel::Default
 Compression level to use when writing Chunks. Slower generally produces smaller files, at the expense of more CPU time. These levels map to different internal settings for each compression algorithm.
 
bool forceCompression = false
 By default, Chunks that do not benefit from compression will be written uncompressed. This option can be used to force compression on all Chunks. This option is ignored if noChunking=true.
 
std::string profile
 The recording profile. See https://mcap.dev/spec/registry#well-known-profiles for more information on well-known profiles.
 
std::string library = "libmcap " MCAP_LIBRARY_VERSION
 A freeform string written by recording libraries. For this library, the default is "libmcap {Major}.{Minor}.{Patch}".
 
bool noRepeatedSchemas = false
 
bool noRepeatedChannels = false
 
bool noAttachmentIndex = false
 
bool noMetadataIndex = false
 
bool noChunkIndex = false
 
bool noStatistics = false
 
bool noSummaryOffsets = false
 

Constructor & Destructor Documentation

◆ McapWriterOptions()

mcap::McapWriterOptions::McapWriterOptions ( const std::string_view  profile)
inline

Definition at line 107 of file writer.hpp.

Member Data Documentation

◆ chunkSize

uint64_t mcap::McapWriterOptions::chunkSize = DefaultChunkSize

Target uncompressed Chunk payload size in bytes. Once a Chunk's uncompressed data is about to exceed this size, the Chunk will be compressed (if enabled) and written to disk. Note that this is a 'soft' ceiling as some Chunks could exceed this size due to either indexing data or when a single message is larger than chunkSize, in which case, the Chunk will contain only this one large message. This option is ignored if noChunking=true.

Definition at line 66 of file writer.hpp.

◆ compression

Compression mcap::McapWriterOptions::compression = Compression::Zstd

Compression algorithm to use when writing Chunks. This option is ignored if noChunking=true.

Definition at line 71 of file writer.hpp.

◆ compressionLevel

CompressionLevel mcap::McapWriterOptions::compressionLevel = CompressionLevel::Default

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

Definition at line 77 of file writer.hpp.

◆ enableDataCRC

bool mcap::McapWriterOptions::enableDataCRC = false

Enable CRC calculations for all records in the data section.

Definition at line 33 of file writer.hpp.

◆ forceCompression

bool mcap::McapWriterOptions::forceCompression = false

By default, Chunks that do not benefit from compression will be written uncompressed. This option can be used to force compression on all Chunks. This option is ignored if noChunking=true.

Definition at line 83 of file writer.hpp.

◆ library

std::string mcap::McapWriterOptions::library = "libmcap " MCAP_LIBRARY_VERSION

A freeform string written by recording libraries. For this library, the default is "libmcap {Major}.{Minor}.{Patch}".

Definition at line 94 of file writer.hpp.

◆ noAttachmentCRC

bool mcap::McapWriterOptions::noAttachmentCRC = false

Disable CRC calculations for Attachments.

Definition at line 29 of file writer.hpp.

◆ noAttachmentIndex

bool mcap::McapWriterOptions::noAttachmentIndex = false

Definition at line 101 of file writer.hpp.

◆ noChunkCRC

bool mcap::McapWriterOptions::noChunkCRC = false

Disable CRC calculations for Chunks.

Definition at line 25 of file writer.hpp.

◆ noChunkIndex

bool mcap::McapWriterOptions::noChunkIndex = false

Definition at line 103 of file writer.hpp.

◆ noChunking

bool mcap::McapWriterOptions::noChunking = false

Do not write Chunks to the file, instead writing Schema, Channel, and Message records directly into the Data section.

Definition at line 42 of file writer.hpp.

◆ noMessageIndex

bool mcap::McapWriterOptions::noMessageIndex = false

Do not write Message Index records to the file. If noMessageIndex=true and noChunkIndex=false, Chunk Index records will still be written to the Summary section, providing a coarse message index.

Definition at line 48 of file writer.hpp.

◆ noMetadataIndex

bool mcap::McapWriterOptions::noMetadataIndex = false

Definition at line 102 of file writer.hpp.

◆ noRepeatedChannels

bool mcap::McapWriterOptions::noRepeatedChannels = false

Definition at line 100 of file writer.hpp.

◆ noRepeatedSchemas

bool mcap::McapWriterOptions::noRepeatedSchemas = false

Definition at line 99 of file writer.hpp.

◆ noStatistics

bool mcap::McapWriterOptions::noStatistics = false

Definition at line 104 of file writer.hpp.

◆ noSummary

bool mcap::McapWriterOptions::noSummary = false

Do not write Summary or Summary Offset sections to the file, placing the Footer record immediately after DataEnd. This can provide some speed boost to file writing and produce smaller files, at the expense of requiring a conversion process later if fast summarization or indexed access is desired.

Definition at line 56 of file writer.hpp.

◆ noSummaryCRC

bool mcap::McapWriterOptions::noSummaryCRC = false

Disable CRC calculations for the summary section.

Definition at line 37 of file writer.hpp.

◆ noSummaryOffsets

bool mcap::McapWriterOptions::noSummaryOffsets = false

Definition at line 105 of file writer.hpp.

◆ profile

std::string mcap::McapWriterOptions::profile

The recording profile. See https://mcap.dev/spec/registry#well-known-profiles for more information on well-known profiles.

Definition at line 89 of file writer.hpp.


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