modbustest

package
v0.0.0-...-8ad4bdb Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServerOnRandomPort

func RunServerOnRandomPort(
	ctx context.Context,
	handler func(received []byte, bytesRead int) (response []byte, closeConnection bool),
) (string, error)

RunServerOnRandomPort is low level helper function for testing modbus packets. Method starts server in separate goroutine and runs it until given context is cancelled. Given PacketAssembler is used by server to handle incoming data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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