modbus

package
v3.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Name() string
	Device() string
	BaudRate() int
	ReadTimeout() time.Duration
	LogDebug() bool
}

type ModbusStruct

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

func New

func New(cfg Config) (*ModbusStruct, error)

func (*ModbusStruct) Name

func (md *ModbusStruct) Name() string

func (*ModbusStruct) Read

func (md *ModbusStruct) Read(b []byte) (n int, err error)

func (*ModbusStruct) RecvFlush

func (md *ModbusStruct) RecvFlush()

func (*ModbusStruct) Shutdown

func (md *ModbusStruct) Shutdown()

func (*ModbusStruct) Write

func (md *ModbusStruct) Write(b []byte) (n int, err error)

func (*ModbusStruct) WriteRead

func (md *ModbusStruct) WriteRead(request []byte, responseBuf []byte) error

Jump to

Keyboard shortcuts

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