Class McapWriter

McapWriter provides an interface for writing messages to MCAP files.

NOTE: callers must wait on any method call to complete before calling another method. Calling a method before another has completed will result in a corrupt MCAP file.

Hierarchy

  • McapWriter

Constructors

Properties

attachmentIndices: undefined | AttachmentIndex[]
channels: Map<number, Channel> = ...
chunkBuilder: undefined | McapChunkBuilder
chunkIndices: undefined | ChunkIndex[]
chunkSize: number
compressChunk: undefined | ((chunkData: Uint8Array) => {
    compressedData: Uint8Array;
    compression: string;
})
dataSectionCrc: number = ...
metadataIndices: undefined | MetadataIndex[]
nextChannelId: number = 0
nextSchemaId: number = 1
recordWriter: McapRecordBuilder = ...
repeatChannels: boolean
repeatSchemas: boolean
schemas: Map<number, Schema> = ...
statistics: undefined | Statistics
useSummaryOffsets: boolean
writable: IWritable
writtenChannelIds: Set<number> = ...
writtenSchemaIds: Set<number> = ...

Methods

  • Add a channel and return a generated channel id. The channel id is used when adding messages.

    Parameters

    Returns Promise<number>

  • Add a schema and return a generated schema id. The schema id is used when adding channels.

    Parameters

    Returns Promise<number>

Generated using TypeDoc