modbus_tcp

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

README

MODBUS TCP Plugin

Documentation

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "modbus_tcp"
	// FuncEntityAction ...
	FuncEntityAction = "entityAction"
	// DeviceTypeModbusTcp ...
	DeviceTypeModbusTcp = node.DeviceType("modbus_tcp")

	Version = "0.0.1"
)
View Source
const (
	// AttrSlaveId ...
	AttrSlaveId = "slave_id"
	// AttrAddressPort ...
	AttrAddressPort = "address_port"
)

Variables

Functions

func New

func New() supervisor.Pluggable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewModbusTcp

func NewModbusTcp(eventBus bus.Bus, actor *Actor) (modbus modbusTcp)

NewModbusTcp ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

Types

type Actor

type Actor struct {
	*supervisor.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	service supervisor.Service) (actor *Actor)

NewActor ...

func (*Actor) Destroy added in v0.12.0

func (e *Actor) Destroy()

func (*Actor) SetState

func (e *Actor) SetState(params supervisor.EntityStateParams) error

SetState ...

type ModBusCommand

type ModBusCommand struct {
	Function string   `json:"function"`
	Address  uint16   `json:"address"`
	Count    uint16   `json:"count"`
	Command  []uint16 `json:"command"`
}

ModBusCommand ...

type ModBusResponse

type ModBusResponse struct {
	Error  string   `json:"error"`
	Time   float64  `json:"time"`
	Result []uint16 `json:"result"`
}

ModBusResponse ...

Jump to

Keyboard shortcuts

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