Go to the documentation of this file.
11 #include <unordered_map>
16 #define MCAP_LIBRARY_VERSION "1.2.0"
22 using KeyValueMap = std::unordered_map<std::string, std::string>;
92 return sizeof(opcode) +
sizeof(dataSize) + dataSize;
121 : summaryStart(summaryStart)
122 , summaryOffsetStart(summaryOffsetStart)
142 ,
data{
reinterpret_cast<const std::byte*
>(
data.data()),
143 reinterpret_cast<const std::byte*
>(
data.data() +
data.size())} {}
170 , messageEncoding(messageEncoding)
172 , metadata(metadata) {}
207 const std::byte*
data =
nullptr;
221 const std::byte* records =
nullptr;
230 std::vector<std::pair<Timestamp, ByteOffset>>
records;
261 const std::byte*
data =
nullptr;
282 4 + attachment.name.
size() +
285 4 + attachment.mediaType.
size() +
286 8 + attachment.dataSize +
288 , logTime(attachment.logTime)
289 , createTime(attachment.createTime)
290 , dataSize(attachment.dataSize)
291 , name(attachment.name)
292 , mediaType(attachment.mediaType) {}
362 , chunkOffset(chunkOffset_) {}
368 return !(*
this == other);
371 return ((*
this == other) || (*
this > other));
374 return !(*
this >= other);
377 return !(*
this > other);
398 , messageOffset(offset) {}
403 #ifdef MCAP_IMPLEMENTATION
404 # include "types.inl"
RecordOffset(ByteOffset offset_)
ByteOffset messageIndexLength
bool operator<=(const RecordOffset &other) const
uint32_t sequence
An optional sequence number. If non-zero, sequence numbers should be unique per channel and increasin...
Compression
Supported MCAP compression algorithms.
std::vector< std::byte > ByteArray
bool operator!=(const RecordOffset &other) const
Timestamp messageStartTime
Wraps a status code and string message carrying additional context.
std::vector< std::pair< Timestamp, ByteOffset > > records
ByteOffset compressedSize
Chunk Index records are found in the Summary section, providing summary information for a single Chun...
constexpr Timestamp MaxTime
std::optional< ByteOffset > chunkOffset
An collection of Schemas, Channels, and Messages that supports compression and indexing.
std::shared_ptr< Channel > ChannelPtr
ByteOffset uncompressedSize
AttachmentIndex(const Attachment &attachment, ByteOffset fileOffset)
constexpr ByteOffset EndOffset
const RecordOffset messageOffset
span_constexpr std::size_t size(span< T, Extent > const &spn)
std::string messageEncoding
Returned when iterating over Messages in a file, MessageView contains a reference to one Message,...
MessageView(const Message &message, const ChannelPtr channel, const SchemaPtr schema, RecordOffset offset)
Summary Offset records are found in the Summary Offset section. Records in the Summary section are gr...
constexpr MCAP_PUBLIC std::string_view OpCodeString(OpCode opcode)
Get the string representation of an OpCode.
Describes a Channel that messages are written to. A Channel represents a single connection from a pub...
constexpr char LibraryVersion[]
#define MCAP_LIBRARY_VERSION
Timestamp messageStartTime
Timestamp publishTime
Nanosecond timestamp when this message was initially published. If not available, this should be set ...
ByteOffset chunkStartOffset
bool operator==(QwtEventPattern::MousePattern b1, QwtEventPattern::MousePattern b2)
Compare operator.
An Attachment is an arbitrary file embedded in an MCAP file, including a name, media type,...
constexpr uint8_t Magic[]
CompressionLevel
Compression level to use when compression is enabled. Slower generally produces smaller files,...
uint64_t dataSize
Size of the message payload in bytes, pointed to via data.
std::shared_ptr< Schema > SchemaPtr
basic_string_view< char > string_view
bool operator>=(const RecordOffset &other) const
std::unordered_map< ChannelId, ByteOffset > messageIndexOffsets
Schema(const std::string_view name, const std::string_view encoding, const std::string_view data)
The Statistics record is found in the Summary section, providing counts and timestamp ranges for the ...
uint64_t recordSize() const
RecordOffset(ByteOffset offset_, ByteOffset chunkOffset_)
Timestamp messageStartTime
A single Message published to a Channel.
Timestamp logTime
Nanosecond timestamp when this message was recorded or received for recording.
constexpr uint64_t DefaultChunkSize
A generic Type-Length-Value record using a uint8 type and uint64 length. This is the generic form of ...
std::function< void(const Status &)> ProblemCallback
constexpr bool operator>(const optional< T > &lhs, const optional< U > &rhs)
\group relop
bool operator<(const RecordOffset &other) const
A list of timestamps to byte offsets for a single Channel. This record appears after each Chunk,...
The final record in the Data section, signaling the end of Data and beginning of Summary....
Describes a schema used for message encoding and decoding and/or describing the shape of messages....
std::unordered_map< std::string, std::string > KeyValueMap
constexpr char SpecVersion
Attachment Index records are found in the Summary section, providing summary information for a single...
ByteOffset compressedSize
Channel(const std::string_view topic, const std::string_view messageEncoding, SchemaId schemaId, const KeyValueMap &metadata={})
std::unordered_map< ChannelId, uint64_t > channelMessageCounts
ByteOffset uncompressedSize
Schema(const std::string_view name, const std::string_view encoding, const ByteArray &data)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:48