serial

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Serial

type Serial struct {
	Dev         string
	Baud        int
	ReadTimeout time.Duration
	StopBits    int

	Port *serial.Port
	// contains filtered or unexported fields
}

func (*Serial) Close

func (s *Serial) Close() (*Serial, error)

func (*Serial) Open

func (s *Serial) Open() (*Serial, error)

type SerialService

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

func NewSerialService

func NewSerialService(cfg *config.AppConfig) *SerialService

func (*SerialService) DeviceList

func (s *SerialService) DeviceList() []string

func (*SerialService) SerialList

func (s *SerialService) SerialList(baud int, readTimeout time.Duration, stopBits int) (serialList []*Serial)

Jump to

Keyboard shortcuts

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