modbustools

package module
v0.0.0-...-63b8aca Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(e error)

Check : checks if the input error has a value to "panic" or ignores it if it's nil

func ConvertParity

func ConvertParity(parity int) string

ConvertParity : converts parity from a custom numeric id to the string ids used by relying module

func SetupHandler

func SetupHandler(config SerialConfig) *modbus.RTUClientHandler

SetupHandler : creates and returns a handler to use to read device information

Types

type Client

type Client modbus.Client

Client from modbus

type SerialConfig

type SerialConfig struct {
	// Serial port configuration.
	serial.Config
	IdleTimeout time.Duration
}

SerialConfig : struct object to store serial configuration

func SetupConfig

func SetupConfig(address string, baudRate int, dataBits int, stopBits int, parity string, timeout int64) SerialConfig

SetupConfig : creates and returns an object with the given configuration

func TypicalConfig

func TypicalConfig() SerialConfig

TypicalConfig : creates and returns a typical configuration object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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