modbus

package
v0.0.0-...-26c87ff Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package modbus contains all the modbus related components

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterData

func RegisterData(slaves []config.ParsedSlave, conf config.ListSlaves) error

RegisterData receives the data of the modbus systems and start querying the modbus slaves in regular intervals in order to expose the data to prometheus

Types

type Handler

type Handler struct {
	//Handler         modbus.ClientHandler
	Type      config.PortType
	KeepAlive bool
	Handler   interface {
		modbus.ClientHandler
		Connect() error
		Close() error
	}
}

Handler is an API helper to manage a modbus handler

func (*Handler) Close

func (hc *Handler) Close() error

Close closes the connection

func (*Handler) Connect

func (hc *Handler) Connect() error

Connect starts the connection

Jump to

Keyboard shortcuts

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