pjmsg_mcap_wrapper
|
Go to the source code of this file.
#include "errors.hpp"
#include "visibility.hpp"
#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>
Classes | |
struct | mcap::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 | mcap::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... | |
struct | mcap::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 | mcap::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 | mcap::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 | mcap::Message |
A single Message published to a Channel. More... | |
struct | mcap::Chunk |
An collection of Schemas, Channels, and Messages that supports compression and indexing. More... | |
struct | mcap::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 | mcap::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 | mcap::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 | mcap::AttachmentIndex |
Attachment Index records are found in the Summary section, providing summary information for a single Attachment. More... | |
struct | mcap::Statistics |
The Statistics record is found in the Summary section, providing counts and timestamp ranges for the entire file. More... | |
struct | mcap::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 | mcap::MetadataIndex |
Metadata Index records are found in the Summary section, providing summary information for a single Metadata record. More... | |
struct | mcap::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 | mcap::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... | |
struct | mcap::RecordOffset |
struct | mcap::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... | |
Namespaces | |
namespace | mcap |
Macros | |
#define | MCAP_LIBRARY_VERSION "2.1.0" |
Typedefs | |
using | mcap::SchemaId = uint16_t |
using | mcap::ChannelId = uint16_t |
using | mcap::Timestamp = uint64_t |
using | mcap::ByteOffset = uint64_t |
using | mcap::KeyValueMap = std::unordered_map< std::string, std::string > |
using | mcap::ByteArray = std::vector< std::byte > |
using | mcap::ProblemCallback = std::function< void(const Status &)> |
using | mcap::SchemaPtr = std::shared_ptr< Schema > |
using | mcap::ChannelPtr = std::shared_ptr< Channel > |
Enumerations | |
enum struct | mcap::Compression { mcap::None , mcap::Lz4 , mcap::Zstd } |
Supported MCAP compression algorithms. More... | |
enum struct | mcap::CompressionLevel { mcap::Fastest , mcap::Fast , mcap::Default , mcap::Slow , mcap::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 struct | mcap::OpCode : uint8_t { mcap::Header = 0x01 , mcap::Footer = 0x02 , mcap::Schema = 0x03 , mcap::Channel = 0x04 , mcap::Message = 0x05 , mcap::Chunk = 0x06 , mcap::MessageIndex = 0x07 , mcap::ChunkIndex = 0x08 , mcap::Attachment = 0x09 , mcap::AttachmentIndex = 0x0A , mcap::Statistics = 0x0B , mcap::Metadata = 0x0C , mcap::MetadataIndex = 0x0D , mcap::SummaryOffset = 0x0E , mcap::DataEnd = 0x0F } |
MCAP record types. More... | |
Functions | |
MCAP_PUBLIC constexpr std::string_view | mcap::OpCodeString (OpCode opcode) |
Get the string representation of an OpCode. | |
Variables | |
constexpr char | mcap::SpecVersion = '0' |
constexpr char | mcap::LibraryVersion [] = MCAP_LIBRARY_VERSION |
constexpr uint8_t | mcap::Magic [] = {137, 77, 67, 65, 80, SpecVersion, 13, 10} |
constexpr uint64_t | mcap::DefaultChunkSize = 1024 * 768 |
constexpr ByteOffset | mcap::EndOffset = std::numeric_limits<ByteOffset>::max() |
constexpr Timestamp | mcap::MaxTime = std::numeric_limits<Timestamp>::max() |