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