test

package
v0.0.0-...-c15c682 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README

System testing for modbus library

Modbus simulator

# TCP
$ diagslave -m tcp -p 5020

# RTU/ASCII
$ socat -d -d pty,raw,echo=0 pty,raw,echo=0
2015/04/03 12:34:56 socat[2342] N PTY is /dev/pts/6
2015/04/03 12:34:56 socat[2342] N PTY is /dev/pts/7
$ diagslave -m ascii /dev/pts/7

# Or
$ diagslave -m rtu /dev/pts/7

$ go test -v -run TCP
$ go test -v -run RTU
$ go test -v -run ASCII

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEquals

func AssertEquals(t *testing.T, expected, actual interface{})

func ClientTestAll

func ClientTestAll(t *testing.T, client modbus.Client)

func ClientTestMaskWriteRegisters

func ClientTestMaskWriteRegisters(t *testing.T, client modbus.Client)

func ClientTestReadCoils

func ClientTestReadCoils(t *testing.T, client modbus.Client)

func ClientTestReadDiscreteInputs

func ClientTestReadDiscreteInputs(t *testing.T, client modbus.Client)

func ClientTestReadFIFOQueue

func ClientTestReadFIFOQueue(t *testing.T, client modbus.Client)

func ClientTestReadHoldingRegisters

func ClientTestReadHoldingRegisters(t *testing.T, client modbus.Client)

func ClientTestReadInputRegisters

func ClientTestReadInputRegisters(t *testing.T, client modbus.Client)

func ClientTestReadWriteMultipleRegisters

func ClientTestReadWriteMultipleRegisters(t *testing.T, client modbus.Client)

func ClientTestWriteMultipleCoils

func ClientTestWriteMultipleCoils(t *testing.T, client modbus.Client)

func ClientTestWriteMultipleRegisters

func ClientTestWriteMultipleRegisters(t *testing.T, client modbus.Client)

func ClientTestWriteSingleCoil

func ClientTestWriteSingleCoil(t *testing.T, client modbus.Client)

func ClientTestWriteSingleRegister

func ClientTestWriteSingleRegister(t *testing.T, client modbus.Client)

Types

This section is empty.

Directories

Path Synopsis
Port of commw32.c To generate go types: go tool cgo commw32.go
Port of commw32.c To generate go types: go tool cgo commw32.go

Jump to

Keyboard shortcuts

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