Skip to content

Commit

Permalink
rename options to mcap_opetions
Browse files Browse the repository at this point in the history
Signed-off-by: jdsika <[email protected]>
  • Loading branch information
jdsika committed Dec 2, 2024
1 parent 1d3f4e8 commit 7a7abf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/convert_osi2mcap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ int main(const int argc, const char** argv) {
}

auto trace_file_writer = osi3::MCAPTraceFileWriter();
mcap::McapWriterOptions options("osi2mcap");
mcap::McapWriterOptions mcap_options("osi2mcap");
// Adapt chunk size according to data and usecase:
// Example: ros2 is using 4 * 1024 * 1024)
options.chunkSize = 4 * 1024 * 1024;
options.compression = mcap::Compression::Zstd;
mcap_options.chunkSize = 4 * 1024 * 1024;
mcap_options.compression = mcap::Compression::Zstd;

if (!trace_file_writer.Open(options->output_file_path, options)) {
if (!trace_file_writer.Open(options->output_file_path, mcap_options)) {
std::cerr << "ERROR: Could not open output file " << options->output_file_path << std::endl;
return 1;
}
Expand Down
8 changes: 4 additions & 4 deletions examples/example_mcap_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ int main(int argc, const char** argv) {
const auto trace_file_path = GenerateTempFilePath();
std::cout << "Creating trace_file at " << trace_file_path << std::endl;

mcap::McapWriterOptions options("osi");
mcap::McapWriterOptions mcap_options("osi");
// Adapt chunk size according to data and usecase:
// Example: ros2 is using 4 * 1024 * 1024)
options.chunkSize = 4 * 1024 * 1024;
mcap_options.chunkSize = 4 * 1024 * 1024;
// Default: zstd
options.compression = mcap::Compression::Lz4;
mcap_options.compression = mcap::Compression::Lz4;

trace_file_writer.Open(trace_file_path, options);
trace_file_writer.Open(trace_file_path, mcap_options);

// add required and optional metadata to the net.asam.osi.trace metadata record
auto net_asam_osi_trace_metadata = osi3::MCAPTraceFileWriter::PrepareRequiredFileMetadata();
Expand Down

0 comments on commit 7a7abf8

Please sign in to comment.