fitcsv

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: BSD-3-Clause Imports: 19 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 CSVToFITConv added in v0.13.2

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

func NewCSVToFITConv added in v0.13.2

func NewCSVToFITConv(fitWriter io.Writer, csvReader io.Reader) *CSVToFITConv

NewCSVToFITConv creates a new CSV to FIT converter.

func (*CSVToFITConv) Convert added in v0.13.2

func (c *CSVToFITConv) Convert() error

func (*CSVToFITConv) ResultInfo added in v0.13.2

func (c *CSVToFITConv) ResultInfo() CSVToFITConvInfo

type CSVToFITConvInfo added in v0.13.2

type CSVToFITConvInfo struct {
	UnknownMesg         int
	UnknownField        int
	UnknownDynamicField int
	Sequence            int
}

type FITToCSVConv added in v0.13.2

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 NewFITToCSVConv added in v0.13.2

func NewFITToCSVConv(w io.Writer, opts ...Option) *FITToCSVConv

NewFITToCSVConv 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 added in v0.13.2

func (c *FITToCSVConv) Err() error

Err returns any error that occur during processing events.

func (*FITToCSVConv) OnMesg added in v0.13.2

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

OnMesgDef receive message from broadcaster

func (*FITToCSVConv) OnMesgDef added in v0.13.2

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

OnMesgDef receive message definition from broadcaster

func (*FITToCSVConv) Wait added in v0.13.2

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 func(o *options)

Option is FITToCSVConv's option.

func WithChannelBufferSize

func WithChannelBufferSize(size int) Option

func WithPrintGPSPositionInDegrees added in v0.13.1

func WithPrintGPSPositionInDegrees() Option

func WithPrintOnlyValidValue added in v0.5.1

func WithPrintOnlyValidValue() Option

func WithPrintRawValue added in v0.5.1

func WithPrintRawValue() Option

func WithPrintUnknownMesgNum added in v0.5.1

func WithPrintUnknownMesgNum() Option

func WithTrimTrailingCommas added in v0.13.1

func WithTrimTrailingCommas() 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