Examples

This project ships examples in both C++ and Python that demonstrate how to read/write OSI trace files and convert between formats. Use them as reference implementations for API usage and expected file formats.

C++ examples

Build C++ examples

Examples are built as part of the normal build:

make build cpp

Run C++ examples

Binaries are in build-vcpkg/cpp/examples/ (or build/cpp/examples/ for the base preset).

./build-vcpkg/cpp/examples/example_mcap_reader input.mcap

For more details, see cpp/examples/README.md.

Python examples

Setup Python environment

make setup

Run Python examples

python python/examples/example_mcap_writer.py
python python/examples/example_mcap_reader.py .playground/sv_example.mcap

For more details, see python/examples/README.md.