nodes

package
Version: v0.0.0-...-5760128 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Id             int
	CommandClasses []*database.CommandClass

	StateBool  map[string]bool
	StateFloat map[string]float64
	// contains filtered or unexported fields
}

func (*Endpoint) Level

func (e *Endpoint) Level(value float64)

func (*Endpoint) Off

func (e *Endpoint) Off()

func (*Endpoint) On

func (e *Endpoint) On()

func (*Endpoint) Write

func (e *Endpoint) Write(msg interfaces.Encodable)

type List

type List struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewList

func NewList() *List

func (*List) Add

func (l *List) Add(node *Node)

func (List) All

func (l List) All() map[int]*Node

func (List) Get

func (l List) Get(id int) *Node

func (List) MarshalJSON

func (l List) MarshalJSON() ([]byte, error)

func (*List) UnmarshalJSON

func (l *List) UnmarshalJSON(data []byte) error

type ManufacurerSpecific

type ManufacurerSpecific struct {
}

type Node

type Node struct {
	Id      int  `json:"id"`
	IsAwake bool `json:"is_awake"`

	ManufacurerSpecific *reports.ManufacturerSpecific

	//Device *database.Device
	Brand       string
	Product     string
	Description string

	CommandClasses []*database.CommandClass

	Endpoints []*Endpoint

	StateBool  map[string]bool
	StateFloat map[string]float64

	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(address int) *Node

func (*Node) Endpoint

func (n *Node) Endpoint(id int) *Endpoint

func (*Node) GetID

func (n *Node) GetID() int

func (*Node) HasCommand

func (n *Node) HasCommand(c commands.ZWaveCommand) bool

func (*Node) Identify

func (n *Node) Identify()

func (*Node) IsDeviceClass

func (n *Node) IsDeviceClass(generic, specific byte) bool

func (*Node) Level

func (n *Node) Level(value float64)

func (*Node) Off

func (n *Node) Off()

func (*Node) On

func (n *Node) On()

func (*Node) ProcessEvent

func (n *Node) ProcessEvent(event reports.Report)

func (*Node) ProtocolInfo

func (n *Node) ProtocolInfo() *serialapi.FuncGetNodeProtocolInfo

func (*Node) RequestEndpoints

func (n *Node) RequestEndpoints() error

func (*Node) RequestManufacturerSpecific

func (n *Node) RequestManufacturerSpecific() (*reports.ManufacturerSpecific, error)

func (*Node) RequestProtocolInfo

func (n *Node) RequestProtocolInfo() (*serialapi.FuncGetNodeProtocolInfo, error)

func (*Node) RequestStates

func (n *Node) RequestStates() error

func (*Node) Setup

func (n *Node) Setup(connection interfaces.Writer, pushEventFunc func(interface{}))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL