fitcsv

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package fitcsv provides the implementations of fit listener's interfaces that can listen to the events emitted by the decoder. The received events then will be converted and written as csv as they arrive.

This package can be helpful for debuging the library to ensure that the data is being decoded correctly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FitToCsvConv

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

FitToCsvConv is an implementation for listeners that receive message events and convert them into CSV records.

func NewConverter

func NewConverter(w io.Writer, opts ...Option) *FitToCsvConv

NewConverter creates a new fit to csv converter. The caller must call Wait() to wait all events are received and finalizing the convert process.

func (*FitToCsvConv) Err

func (c *FitToCsvConv) Err() error

Err returns any error that occur during processing events.

func (*FitToCsvConv) OnMesg

func (c *FitToCsvConv) OnMesg(mesg proto.Message)

OnMesgDef receive message from broadcaster

func (*FitToCsvConv) OnMesgDef

func (c *FitToCsvConv) OnMesgDef(mesgDef proto.MessageDefinition)

OnMesgDef receive message definition from broadcaster

func (*FitToCsvConv) Wait

func (c *FitToCsvConv) Wait()

Wait closes the buffered channel and wait until all event handling is completed and finalize the data.

type Option

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

func WithChannelBufferSize

func WithChannelBufferSize(size int) Option

func WithPrintOnlyValidValue added in v0.5.1

func WithPrintOnlyValidValue() Option

func WithPrintRawValue added in v0.5.1

func WithPrintRawValue() Option

func WithPrintSemicirclesInDegrees added in v0.5.1

func WithPrintSemicirclesInDegrees() Option

func WithPrintUnknownMesgNum added in v0.5.1

func WithPrintUnknownMesgNum() Option

func WithUseDisk

func WithUseDisk(writeBuffer int) Option

Jump to

Keyboard shortcuts

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