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.
Click to show internal directories.
Click to hide internal directories.