coordinator

package
v0.0.0-...-f8c32d9 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SysResetIndType = reflect.TypeOf(&znp.SysResetInd{})
View Source
var ZdoActiveEpRspType = reflect.TypeOf(&znp.ZdoActiveEpRsp{})
View Source
var ZdoBindRspType = reflect.TypeOf(&znp.ZdoBindRsp{})
View Source
var ZdoNodeDescRspType = reflect.TypeOf(&znp.ZdoNodeDescRsp{})
View Source
var ZdoSimpleDescRspType = reflect.TypeOf(&znp.ZdoSimpleDescRsp{})
View Source
var ZdoUnbindRspType = reflect.TypeOf(&znp.ZdoUnbindRsp{})

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	NetworkConfiguration
	Led    bool `json:"LED,omitempty"`
	Serial *Serial
}

func (*Configuration) GetNetworkKey

func (c *Configuration) GetNetworkKey() (zigbee.NetworkKey, error)

func (*Configuration) Valid

func (c *Configuration) Valid() error

type Coordinator

type Coordinator struct {
	// contains filtered or unexported fields
}

func New

func New(config *Configuration) *Coordinator

func (*Coordinator) ActiveEndpoints

func (c *Coordinator) ActiveEndpoints(nwkAddress string) (*znp.ZdoActiveEpRsp, error)

func (*Coordinator) Bind

func (c *Coordinator) Bind(
	dstAddr string,
	srcAddress zigbee.IEEEAddress,
	srcEndpoint zigbee.EndpointId,
	clusterId cluster.ClusterId,
	dstAddress zigbee.IEEEAddress,
	dstEndpoint zigbee.EndpointId,
) (*znp.ZdoBindRsp, error)

func (*Coordinator) DataRequest

func (c *Coordinator) DataRequest(dstAddr string, dstEndpoint zigbee.EndpointId, srcEndpoint zigbee.EndpointId, clusterId uint16, options *znp.AfDataRequestOptions, radius uint8, data []uint8) (*znp.AfIncomingMessage, error)

func (*Coordinator) NetworkConf

func (c *Coordinator) NetworkConf() *NetworkConfiguration

func (*Coordinator) NodeDescription

func (c *Coordinator) NodeDescription(nwkAddress string) (*znp.ZdoNodeDescRsp, error)

func (*Coordinator) OnDeviceAnnounce

func (c *Coordinator) OnDeviceAnnounce() chan *znp.ZdoEndDeviceAnnceInd

func (*Coordinator) OnDeviceLeave

func (c *Coordinator) OnDeviceLeave() chan *znp.ZdoLeaveInd

func (*Coordinator) OnDeviceTc

func (c *Coordinator) OnDeviceTc() chan *znp.ZdoTcDevInd

func (*Coordinator) OnError

func (c *Coordinator) OnError() chan error

func (*Coordinator) OnIncomingMessage

func (c *Coordinator) OnIncomingMessage() chan *znp.AfIncomingMessage

func (*Coordinator) Reset

func (c *Coordinator) Reset() error

func (*Coordinator) Run

func (c *Coordinator) Run(ctx context.Context, joinEnable bool, networkProcessor *znp.Znp, settingsFlash bool) error

func (*Coordinator) SimpleDescription

func (c *Coordinator) SimpleDescription(nwkAddress string, endpoint zigbee.EndpointId) (*znp.ZdoSimpleDescRsp, error)

func (*Coordinator) Unbind

func (c *Coordinator) Unbind(
	dstAddr string,
	srcAddress zigbee.IEEEAddress,
	srcEndpoint zigbee.EndpointId,
	clusterId cluster.ClusterId,
	dstAddress zigbee.IEEEAddress,
	dstEndpoint zigbee.EndpointId,
) (*znp.ZdoUnbindRsp, error)

type MessageChannels

type MessageChannels struct {
	// contains filtered or unexported fields
}

type NetworkConfiguration

type NetworkConfiguration struct {
	IEEEAddress zigbee.IEEEAddress // coordinator's
	PanId       zigbee.PANID
	ExtPanId    zigbee.ExtendedPANID
	NetworkKey  []byte
	Channel     uint8
}

func (NetworkConfiguration) Equal

type Serial

type Serial struct {
	Port     string
	BaudRate *int `json:"BaudRate,omitempty"` // if nil, optimal default is used
}

func (Serial) BaudRateOrDefault

func (s Serial) BaudRateOrDefault() int

Jump to

Keyboard shortcuts

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