modbus_tcp

package
v0.0.0-...-d34fc3c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Description = "" /* 151-byte string literal not displayed */
View Source
var Model = resource.NewModel("bill", "advantech-wise-4050", "modbus")
View Source
var PrettyName = "WISE-4050 4DI/4DO 2.4G WiFi IoT Wireless I/O Module"

Functions

func NewSensor

func NewSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, logger logging.Logger) (sensor.Sensor, error)

Types

type CloudConfig

type CloudConfig struct {
	DeviceAddress string `json:"device_address"`
	Port          string `json:"port"`
	DI            *DI    `json:"digital_inputs"`
	DO            *DO    `json:"digital_outputs"`
}

func (*CloudConfig) Validate

func (conf *CloudConfig) Validate(path string) ([]string, error)

type DI

type DI struct {
	BaseAddress int `json:"base_address"`
	Length      int `json:"length"`
}

This is for Digital Input Parameters

type DO

type DO struct {
	BaseAddress int `json:"base_address"`
	Length      int `json:"length"`
}

This is for Digital Input Parameters

Jump to

Keyboard shortcuts

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