homie

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QOSAtMostOnce  = 0
	QOSAtLeastOnce = 1
	QOSExactlyOnce = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	ActionHandler func(string, string, string) error
	// contains filtered or unexported fields
}

func New

func New(server string) (*Broker, error)

func (*Broker) Close

func (b *Broker) Close() error

func (*Broker) MustClose

func (b *Broker) MustClose()

func (*Broker) PublishDevice

func (d *Broker) PublishDevice(device Device) error

func (*Broker) PublishNode

func (d *Broker) PublishNode(node Node) error

func (*Broker) PublishProperty

func (d *Broker) PublishProperty(property Property) error

func (*Broker) PublishValue

func (d *Broker) PublishValue(nodeID, propertyID string, value any) error

type Device

type Device struct {
	Name           string
	Implementation string
	NodeIDs        []string
}

type Node

type Node struct {
	NodeID      string
	Name        string
	Type        string
	PropertyIDs []string
}

type Property

type Property struct {
	NodeID     string
	PropertyID string

	Name     string
	DataType string

	Format   string
	Settable bool
	Retained bool
	Unit     string
}

Jump to

Keyboard shortcuts

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