serialhandler

package
v0.0.0-...-0954b4e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerInterface

type HandlerInterface interface {
	Write()
	Output() string
	Errors() []string
	DisableErrorCheck()
	SetErrorWords(l []string)
}

HandlerInterface is the interface for a SerialHandler

type SerialHandler

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

SerialHandler handles serial output from the Arduino to generate results

func New

func New(cancel context.CancelFunc) SerialHandler

New generates a new SerialHandler

func (*SerialHandler) DisableErrorCheck

func (s *SerialHandler) DisableErrorCheck()

DisableErrorCheck turns of checking errors on \a

func (*SerialHandler) Errors

func (s *SerialHandler) Errors() []string

Errors gives back the errors found

func (*SerialHandler) Output

func (s *SerialHandler) Output() string

Output gives a string of the current sent output

func (*SerialHandler) SetErrorWords

func (s *SerialHandler) SetErrorWords(l []string)

SetErrorWords allows to replace the words that trigger errors

func (*SerialHandler) Write

func (s *SerialHandler) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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