serialport

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package serialport provides the production serial boundary shared by readers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SerialPort

type SerialPort interface {
	Read(p []byte) (n int, err error)
	Close() error
	SetReadTimeout(t time.Duration) error
}

SerialPort is the subset of serial operations used by scan readers.

func DefaultSerialPortFactory

func DefaultSerialPortFactory(path string, mode *serial.Mode) (SerialPort, error)

DefaultSerialPortFactory opens a hardware serial connection.

type SerialPortFactory

type SerialPortFactory func(path string, mode *serial.Mode) (SerialPort, error)

SerialPortFactory allows readers to inject a serial connection.

Jump to

Keyboard shortcuts

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