pkg

package
v0.0.0-...-501356c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MqttMsgRsp bool
View Source
var MqttOptions *mqtt.ClientOptions
View Source
var MqttToken mqtt.Token

Functions

func ConnModbus

func ConnModbus(device utilsPkg.DevSettings) bool

func MQTTSendMessageAutomatic

func MQTTSendMessageAutomatic(msg utilsPkg.ExitPayloadMsg) bool

func MsgMQTTInput

func MsgMQTTInput(msg mqtt.Message, client mqtt.Client) (utilsPkg.InputMQTTMsg, error)

func ReadInfoMdbs

func ReadInfoMdbs(dev utilsPkg.DevSettings)

ReadInfoMdbs will read informations from device

Types

type MemoryInfoBit

type MemoryInfoBit struct {
	Format  uint8  `json:"format"`
	Address uint16 `json:"address"`
	Name    string `json:"name"`
	Value   bool   `json:"value"`
}

type MemoryInfoWord

type MemoryInfoWord struct {
	Format  uint8  `json:"format"`
	Address uint16 `json:"address"`
	Name    string `json:"name"`
	Value   uint32 `json:"value"`
}

type PlcInfo

type PlcInfo struct {
	BitMemories  []MemoryInfoBit  `json:"bitMemories"`
	SlaveID      uint8            `json:"slaveId"`
	WordMemories []MemoryInfoWord `json:"wordMemories"`
}

Jump to

Keyboard shortcuts

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