|
| 1 | += MCAP Format |
| 2 | + |
| 3 | +== General Requirements |
| 4 | +- Must comply with the https://mcap.dev/spec[MCAP format specification] version `0x30` |
| 5 | +- Must allow other non-OSI data to be present in the MCAP file |
| 6 | +- Message records must be written into `chunk records` for indexed files |
| 7 | + |
| 8 | +== Schema |
| 9 | +- `name` field: Full message type name, including package (e.g., `osi3.SensorData`) |
| 10 | +- `encoding` field: Must be `protobuf` |
| 11 | +- `data` field: String-encoded `google::protobuf::FileDescriptorSet` for the OSI top-level message |
| 12 | + |
| 13 | +== Channel |
| 14 | +- `message_encoding` field: Must be "protobuf" |
| 15 | +- `metadata` field: Should include a brief description of data origin and purpose |
| 16 | + |
| 17 | +== Message |
| 18 | +- `publish_time` field: |
| 19 | + - Must reflect the timestamp of the stored OSI top-level message if it contains a timestamp field |
| 20 | + - Should represent a plausible value to express message order in relation to timestamps of other top-level messages if the message doesn't contain a timestamp (e.g. SensorViewConfiguration) |
| 21 | + - Must be in nanoseconds |
| 22 | +- `log_time` field: Must reflect the time when the message was enqueued for MCAP file addition |
| 23 | + - Must reflect the time when the top-level OSI message was enqueued for addition to the MCAP file |
| 24 | + - Zero time doesn't need to coincide with the Unix epoch, but it is recommended |
| 25 | + - Must be in nanoseconds |
| 26 | + |
| 27 | +== Metadata |
| 28 | +- Must include metadata with the name `versions` containing at least the following key-value pairs: |
| 29 | + * `osi`: SemVer version of OSI specification |
| 30 | + * `protobuf`: SemVer version of protobuf library |
| 31 | +- Must include metadata with the name `creation_date` containing at least the following key-value pairs: |
| 32 | + * `timestamp`: ISO 8601 formatted creation time |
| 33 | +- Must include metadata with the name `description` containing at least the following key-value pairs: |
| 34 | + * `text`: Scenario description |
| 35 | +- Additional custom metadata may be added |
| 36 | + |
| 37 | +== Compression |
| 38 | +- OSI-compliant tooling must support compression types: `none`, `lz4`, and `zstd` |
| 39 | +- Recommended compression in use should be either `lz4` or `zstd` |
0 commit comments