mcap

package
v0.0.0-...-4b0f3de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer writes DecodedSignal proto messages into an MCAP file.

Design decisions:

  • Single protobuf schema (candecode.proto.v1.DecodedSignal) reused by all channels.
  • Channel granularity = (CAN message, Signal) i.e. one signal per channel/topic.
  • Topic naming: /can/<MessageName>/<SignalName>
  • Channel metadata includes: can_id (hex), message (dbc BO_ name), signal, unit (if any), is_extended.

A new channel is created lazily on first occurrence of a (can_id, signal_name) combination.

func NewWriter

func NewWriter(out io.Writer, opts ...WriterOption) (*Writer, error)

NewWriter initializes an MCAP writer with the DecodedSignal schema registered. The provided io.Writer should be an opened file (will not be closed here).

func (*Writer) Close

func (w *Writer) Close() error

Close finalizes the MCAP file.

func (*Writer) WriteDecodedSignal

func (w *Writer) WriteDecodedSignal(ds *candecodeproto.DecodedSignal) error

WriteDecodedSignal writes a single DecodedSignal proto instance as an MCAP message. ds.Timestamp must be set. LogTime/PublishTime use that timestamp.

type WriterOption

type WriterOption interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL