serial

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSettings

type ClientSettings struct {
	SerialSettings
	ResponseTimeout time.Duration
}

func NewClientSettingsFromURI

func NewClientSettingsFromURI(uri string) (*ClientSettings, error)

type SerialSettings

type SerialSettings struct {
	Transport SerialTransport
	Device    string
	Baud      int
	DataBits  int
	Parity    string
	StopBits  int
}

func (*SerialSettings) GetSerialPortConfig

func (s *SerialSettings) GetSerialPortConfig() *sp.Config

type SerialTransport

type SerialTransport string
const (
	RTU   SerialTransport = "rtu"
	ASCII SerialTransport = "ascii"
)

type ServerSettings

type ServerSettings struct {
	SerialSettings
	Address uint16
}

func NewServerSettingsFromURI

func NewServerSettingsFromURI(uri string) (*ServerSettings, error)

Jump to

Keyboard shortcuts

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