serial

package
v0.0.0-...-7dbd9af Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package serial implement the XXX interface over serial

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config serialport.Config

Config contains the information needed to open a serial port.

type Serial

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

Serial represent a serial port session

func NewSerial

func NewSerial(c *Config) (*Serial, error)

NewSerial creates a new serial port session

func (*Serial) Close

func (s *Serial) Close() error

Close the serial session

func (*Serial) Open

func (s *Serial) Open() error

Open the serial session

func (*Serial) Read

func (s *Serial) Read(b []byte) (n int, err error)

func (*Serial) Spawn

func (s *Serial) Spawn(timeout time.Duration, opts ...exp.Option) (*exp.GExpect, <-chan error, error)

Spawn creates a goexpect session over serial

func (*Serial) Write

func (s *Serial) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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