modbus

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright (C) 2023 wwhai

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) RegisterPoint later version.

This program is distributed in the hope that it will be useful, but WITHOUT RegisterPoint WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteValue

func DeleteValue(Slot, K string)

func Flush

func Flush()

func GetSlot

func GetSlot(Slot string) map[string]RegisterPoint

func InitModbusPointCache

func InitModbusPointCache(ruleEngine typex.RuleX) intercache.InterCache

func RegisterSlot

func RegisterSlot(Slot string)

func SetValue

func SetValue(Slot, K string, V RegisterPoint)

func Size

func Size() uint64

func UnRegisterSlot

func UnRegisterSlot(Slot string)

Types

type ModbusPointCache

type ModbusPointCache struct {
	Slots map[string]map[string]RegisterPoint
	// contains filtered or unexported fields
}

func (*ModbusPointCache) DeleteValue

func (M *ModbusPointCache) DeleteValue(Slot, K string)

func (*ModbusPointCache) Flush

func (M *ModbusPointCache) Flush()

func (*ModbusPointCache) GetSlot

func (M *ModbusPointCache) GetSlot(Slot string) map[string]RegisterPoint

func (*ModbusPointCache) GetValue

func (M *ModbusPointCache) GetValue(Slot, K string) RegisterPoint

func (*ModbusPointCache) RegisterSlot

func (M *ModbusPointCache) RegisterSlot(Slot string)

func (*ModbusPointCache) SetValue

func (M *ModbusPointCache) SetValue(Slot, K string, V RegisterPoint)

func (*ModbusPointCache) Size

func (M *ModbusPointCache) Size() uint64

func (*ModbusPointCache) UnRegisterSlot

func (M *ModbusPointCache) UnRegisterSlot(Slot string)

type RegisterPoint

type RegisterPoint struct {
	UUID          string
	Status        int
	LastFetchTime uint64
	Value         string
}

点位表

func GetValue

func GetValue(Slot, K string) RegisterPoint

Jump to

Keyboard shortcuts

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