serial

package
v0.0.0-...-83a780d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: AGPL-3.0 Imports: 6 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 {
	// contains filtered or unexported fields
}

Serial is a wrapper of serial port interface that features specific functions to send provisioning commands through the serial port to an arduino device.

func NewSerial

func NewSerial() *Serial

NewSerial instantiate and returns a Serial instance. The Serial Connect method should be called before using its send/receive functions.

func (*Serial) Close

func (s *Serial) Close() error

Close should be used when the Serial connection isn't used anymore. After that, Serial could Connect again to any port.

func (*Serial) Connect

func (s *Serial) Connect(params transport.TransportInterfaceParams) error

Connect tries to connect Serial to a specific serial port.

func (*Serial) Connected

func (s *Serial) Connected() bool

func (*Serial) Receive

func (s *Serial) Receive(timeoutSeconds int) ([]frame.Frame, error)

func (*Serial) Send

func (s *Serial) Send(data []byte) error

func (*Serial) Type

func (s *Serial) Type() transport.InterfaceType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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