device

package
v3.4.25 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(device *model.Device) error

func GetOnlineCount

func GetOnlineCount() int64

func Load

func Load(id string) error

func SubscribeEvent

func SubscribeEvent() error

func SubscribeOnline

func SubscribeOnline() error

func SubscribeProperty

func SubscribeProperty() error

func SubscribePropertyStrict

func SubscribePropertyStrict() error

Types

type Device

type Device struct {
	*model.Device

	Last   time.Time
	Values map[string]any
	// contains filtered or unexported fields
}

func Ensure

func Ensure(id string) (*Device, error)

func Get

func Get(id string) *Device

func New

func New(m *model.Device) *Device

func (*Device) Build

func (d *Device) Build()

func (*Device) Push

func (d *Device) Push(values map[string]any)

func (*Device) Validate

func (d *Device) Validate()

Jump to

Keyboard shortcuts

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