nibe

package
v2.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Addr byte
	Cmd  byte
	Data []byte
}

type Nibe

type Nibe struct {
	Port string

	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *Nibe

func (*Nibe) Connect

func (n *Nibe) Connect(p string)

func (*Nibe) Describe

func (n *Nibe) Describe(reg uint16) (*Parameter, error)

func (*Nibe) LoadDefinitions

func (n *Nibe) LoadDefinitions(statikFS http.FileSystem, filename string) error

func (*Nibe) OnUpdate

func (n *Nibe) OnUpdate(cb func(reg uint16, value int16))

func (*Nibe) Read

func (n *Nibe) Read(reg uint16) (uint16, error)

func (*Nibe) Stop

func (n *Nibe) Stop()

func (*Nibe) Worker

func (n *Nibe) Worker()

func (*Nibe) Write

func (n *Nibe) Write(reg uint16, value int16) (uint16, error)

type Parameter

type Parameter struct {
	Register string            `json:"register"`
	Factor   int               `json:"factor"`
	Size     string            `json:"size"`
	Mode     string            `json:"mode"`
	Title    string            `json:"titel"`
	Info     string            `json:"info"`
	Unit     string            `json:"unit"`
	Min      string            `json:"min"`
	Max      string            `json:"max"`
	Map      map[string]string `json:"map"`
}

Jump to

Keyboard shortcuts

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