Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

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

  • addAttachment(attachment: Attachment): Promise<void>
  • addMessage(message: Message): Promise<void>
  • addMetadata(metadata: Metadata): Promise<void>
  • end(): Promise<void>
  • finalizeChunk(): Promise<void>
  • registerChannel(info: Omit<Channel, "id">): Promise<number>
  • Add a channel and return a generated channel id. The channel id is used when adding messages.

    Parameters

    Returns Promise<number>

  • registerSchema(info: Omit<Schema, "id">): Promise<number>
  • Add a schema and return a generated schema id. The schema id is used when adding channels.

    Parameters

    Returns Promise<number>

  • start(header: Header): Promise<void>

Generated using TypeDoc