unit_modbus

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ItemNameStatus = "Status"
)

Variables

View Source
var Image []byte

Functions

func New

Types

type Config

type Config struct {
	Addr    string `json:"addr"`
	Timeout float64
	Period  float64
	Items   []Item `json:"items"`
}

type Item

type Item struct {
	Name string  `json:"item_name"`
	Addr float64 `json:"addr"`
	Type float64 `json:"type"`
}

type UnitModbus

type UnitModbus struct {
	units_common.Unit
	// contains filtered or unexported fields
}

func (*UnitModbus) GetConfigMeta

func (c *UnitModbus) GetConfigMeta() string

func (*UnitModbus) InternalUnitStart

func (c *UnitModbus) InternalUnitStart() error

func (*UnitModbus) InternalUnitStop

func (c *UnitModbus) InternalUnitStop()

func (*UnitModbus) ReadCoil added in v1.0.6

func (c *UnitModbus) ReadCoil(conn net.Conn, addr uint16) error

func (*UnitModbus) Tick

func (c *UnitModbus) Tick()

func (*UnitModbus) WriteCoil

func (c *UnitModbus) WriteCoil(conn net.Conn, addr uint16, on bool) error

Jump to

Keyboard shortcuts

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