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) 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
}
Click to show internal directories.
Click to hide internal directories.