zcl

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

the default library. not sure if we ever need additional ones?

Functions

This section is empty.

Types

type ClusterQuery

type ClusterQuery func(c map[cluster.ClusterId]*cluster.Cluster) (cluster.ClusterId, *cluster.Cluster, error)

type CommandExtractor

type CommandExtractor func(commandDescriptors map[uint8]*cluster.CommandDescriptor) (uint8, *cluster.CommandDescriptor, error)

type CommandQuery

type CommandQuery func(c *cluster.Cluster) (uint8, *cluster.CommandDescriptor, error)

type Zcl

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

func (*Zcl) ToZclIncomingMessage

func (z *Zcl) ToZclIncomingMessage(m *znp.AfIncomingMessage) (*ZclIncomingMessage, error)

returns ~ 1:1 AfIncomingMessage but its Data is parsed as specified by (cluster, command) pair

type ZclFrame

type ZclFrame struct {
	FrameControl              *ZclFrameControl
	ManufacturerCode          uint16
	TransactionSequenceNumber uint8
	CommandIdentifier         uint8
	CommandName               string // TODO: make Command an interface that has Name()?
	Command                   interface{}
}

type ZclFrameControl

type ZclFrameControl struct {
	FrameType              frame.FrameType
	ManufacturerSpecific   bool
	Direction              frame.Direction
	DisableDefaultResponse bool
}

type ZclIncomingMessage

type ZclIncomingMessage struct {
	// TODO: instead make most of the shared attributes composed from AfIncomingMessage?
	GroupID              uint16
	ClusterID            cluster.ClusterId
	SrcAddr              string
	SrcEndpoint          zigbee.EndpointId
	DstEndpoint          zigbee.EndpointId
	WasBroadcast         bool
	LinkQuality          uint8
	SecurityUse          bool
	Timestamp            uint32
	TransactionSeqNumber uint8
	Data                 *ZclFrame
}

mapped almost 1:1 from znp.AfIncomingMessage, but Data is decoded

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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