serialrecorder

package
v0.0.0-...-597c14a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(port string, baud int) *serialRecorder

New returns a new serialRecorder that implements PortOpener for serial port that will record and output each write and read to stdout

Types

type Direction

type Direction bool

Direction indicates if its a read or write row

const DirectionRead Direction = false

DirectionRead is a read

const DirectionWrite Direction = true

DirectionWrite is a write

func (Direction) IsRead

func (d Direction) IsRead() bool

IsRead check if direction was read

func (Direction) IsWrite

func (d Direction) IsWrite() bool

IsWrite check if direction was write

func (Direction) String

func (d Direction) String() string

type Row

type Row struct {
	Timestamp time.Time
	Direction Direction
	Data      []byte
}

Row logs one serial read or write

Jump to

Keyboard shortcuts

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