n2kfileendpoint

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package n2kfileendpoint provides reads n2k log files and sends canbus frames to a channel. To use it connect its output channel to a canadapter instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type N2kFileEndpoint

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

N2kFileEndpoint reads an n2k log file and sends canbus frames to its output channel.

func NewN2kFileEndpoint

func NewN2kFileEndpoint(file string, log *logrus.Logger) *N2kFileEndpoint

NewN2kFileEndpoint creates a new n2k endpoint.

func (*N2kFileEndpoint) Run

func (n *N2kFileEndpoint) Run(ctx context.Context) error

Run method opens the specified log file and kicks off a goroutine that sends frames to the handler

func (*N2kFileEndpoint) SetOutput

func (n *N2kFileEndpoint) SetOutput(mh endpoint.MessageHandler)

SetOutput sets the output struct for handling when a message is ready

Jump to

Keyboard shortcuts

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