modbus_rtu

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "modbus_rtu"
	// FuncEntityAction ...
	FuncEntityAction = "entityAction"
	// DeviceTypeModbusRtu ...
	DeviceTypeModbusRtu = node.DeviceType("modbus_rtu")
)
View Source
const (
	// AttrSlaveId ...
	AttrSlaveId = "slave_id"
	// AttrBaud ...
	AttrBaud = "baud"
	// AttrDataBits ...
	AttrDataBits = "data_bits"
	// AttrTimeout ...
	AttrTimeout = "timeout"
	// AttrStopBits ...
	AttrStopBits = "stop_bits"
	// AttrSleep ...
	AttrSleep = "sleep"
	// AttrParity ...
	AttrParity = "parity"
)

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewModbusRtu

func NewModbusRtu(eventBus event_bus.EventBus, actor *Actor) (modbus modbusRtu)

NewModbusRtu ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

Types

type Actor

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

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	entityManager entity_manager.EntityManager,
	adaptors *adaptors.Adaptors,
	scriptService scripts.ScriptService,
	eventBus event_bus.EventBus) (actor *Actor)

NewActor ...

func (*Actor) SetState

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

SetState ...

func (*Actor) Spawn

func (e *Actor) Spawn() entity_manager.PluginActor

Spawn ...

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