znp

package module
v0.0.0-...-69131cf Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 8 Imported by: 17

README

ZigBee Network Processor (ZNP) Interface

Build Status

Overview

ZNP is used for communication between the host and a ZigBee device through a serial port. You can issue Monitor and Test (MT) commands to the ZigBee target from your application.

I tested it with cc2531, but it might work with cc253X

Example

To use it you need to provide a reference to an unp instance:

import (
	"go.bug.st/serial.v1"
	"github.com/davecgh/go-spew/spew"
	"github.com/dyrkin/unp-go"
	"github.com/dyrkin/znp-go"
)

func main() {
	mode := &serial.Mode{
		BaudRate: 115200,
	}

	port, err := serial.Open("/dev/tty.usbmodem14101", mode)
	if err != nil {
		log.Fatal(err)
	}
	port.SetRTS(true)

	u := unp.New(1, port)
	z := znp.New(u)
	z.Start()
}

Then you be able to run commands:

res, err := z.SysSetExtAddr("0x00124b00019c2ee9")
if err != nil {
	log.Fatal(err)
}
	
res, err = z.SapiZbPermitJoiningRequest("0xFF00", 200)
if err != nil {
	log.Fatal(err)
}

To receive async commands and errors, use AsyncInbound() and Errors() channels:

go func() {
    for {
        select {
        case err := <-z.Errors():
            fmt.Printf("Error received: %s\n", err)
        case async := <-z.AsyncInbound():
            fmt.Printf("Async received: %s\n", spew.Sdump(async))
        }
    }
}()

To log all ingoing and outgoing unp frames, use InFramesLog() and OutFramesLog() channels:

go func() {
    for {
        select {
        case frame := <-z.OutFramesLog():
            fmt.Printf("Frame sent: %s\n", spew.Sdump(frame))
        case frame := <-z.InFramesLog():
            fmt.Printf("Frame received: %s\n", spew.Sdump(frame))
        }
    }
}()

See more examples

Documentation

Index

Constants

View Source
const (
	ZbBindingAddr   = "0xFFFE"
	ZbBroadcastAddr = "0xFFFF"
)
View Source
const (
	InvalidNodeAddr = "0xFFFE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action uint8
const (
	ActionDisable Action = 0
	ActionEnable  Action = 1
)

func (Action) String

func (i Action) String() string

type Addr

type Addr struct {
	AddrMode     AddrMode
	ShortAddr    string `hex:"2" cond:"uint:AddrMode!=3"`
	ExtendedAddr string `hex:"8" cond:"uint:AddrMode==3"`
	DstEndpoint  uint8  `cond:"uint:AddrMode==3"`
}

type AddrMode

type AddrMode uint8
const (
	AddrModeAddrNotPresent AddrMode = iota
	AddrModeAddrGroup
	AddrModeAddr16Bit
	AddrModeAddr64Bit
	AddrModeAddrBroadcast AddrMode = 15 //or 0xFF??????
)

func (AddrMode) String

func (i AddrMode) String() string

type AfApsfConfigSet

type AfApsfConfigSet struct {
	Endpoint   uint8
	FrameDelay uint8
	WindowSize uint8
}

type AfDataConfirm

type AfDataConfirm struct {
	Status   Status
	Endpoint uint8
	TransID  uint8
}

type AfDataRequest

type AfDataRequest struct {
	DstAddr     string `hex:"2"`
	DstEndpoint uint8
	SrcEndpoint uint8
	ClusterID   uint16
	TransID     uint8
	Options     *AfDataRequestOptions
	Radius      uint8
	Data        []uint8 `size:"1"`
}

type AfDataRequestExt

type AfDataRequestExt struct {
	DstAddrMode AddrMode
	DstAddr     string `hex:"8"`
	DstEndpoint uint8
	DstPanID    uint16 //PAN - personal area networks
	SrcEndpoint uint8
	ClusterID   uint16
	TransID     uint8
	Options     *AfDataRequestOptions
	Radius      uint8
	Data        []uint8 `size:"2"`
}

type AfDataRequestOptions

type AfDataRequestOptions struct {
	WildcardProfileID uint8 `bits:"0b00000010" bitmask:"start" `
	APSAck            uint8 `bits:"0b00010000"`
	DiscoverRoute     uint8 `bits:"0b00100000"`
	APSSecurity       uint8 `bits:"0b01000000"`
	SkipRouting       uint8 `bits:"0b10000000" bitmask:"end" `
}

type AfDataRequestSrcRtg

type AfDataRequestSrcRtg struct {
	DstAddr     string `hex:"2"`
	DstEndpoint uint8
	SrcEndpoint uint8
	ClusterID   uint16
	TransID     uint8
	Options     *AfDataRequestSrcRtgOptions
	Radius      uint8
	RelayList   []string `size:"1" hex:"2"`
	Data        []uint8  `size:"1"`
}

type AfDataRequestSrcRtgOptions

type AfDataRequestSrcRtgOptions struct {
	APSAck      uint8 `bits:"0b00000001" bitmask:"start`
	APSSecurity uint8 `bits:"0b00000100"`
	SkipRouting uint8 `bits:"0b00001000" bitmask:"end" `
}

type AfDataRetrieve

type AfDataRetrieve struct {
	Timestamp uint32
	Index     uint16
	Length    uint8
}

type AfDataRetrieveResponse

type AfDataRetrieveResponse struct {
	Status StatusResponse
	Data   []uint8 `size:"1"`
}

type AfDataStore

type AfDataStore struct {
	Index uint16
	Data  []uint8 `size:"1"`
}

type AfIncomingMessage

type AfIncomingMessage struct {
	GroupID        uint16
	ClusterID      uint16
	SrcAddr        string `hex:"2"`
	SrcEndpoint    uint8
	DstEndpoint    uint8
	WasBroadcast   uint8
	LinkQuality    uint8
	SecurityUse    uint8
	Timestamp      uint32
	TransSeqNumber uint8
	Data           []uint8 `size:"1"`
}

type AfIncomingMessageExt

type AfIncomingMessageExt struct {
	GroupID        uint16
	ClusterID      uint16
	SrcAddrMode    AddrMode
	SrcAddr        string `hex:"8"`
	SrcEndpoint    uint8
	SrcPanID       uint16
	DstEndpoint    uint8
	WasBroadcast   uint8
	LinkQuality    uint8
	SecurityUse    uint8
	Timestamp      uint32
	TransSeqNumber uint8
	Data           []uint8 `size:"2"`
}

type AfInterPanChkData

type AfInterPanChkData struct {
	PanID    uint16
	Endpoint uint8
}

func (*AfInterPanChkData) AfInterPanCtlData

func (a *AfInterPanChkData) AfInterPanCtlData()

type AfInterPanClrData

type AfInterPanClrData struct{}

func (*AfInterPanClrData) AfInterPanCtlData

func (a *AfInterPanClrData) AfInterPanCtlData()

type AfInterPanCtl

type AfInterPanCtl struct {
	Command InterPanCommand
	Data    AfInterPanCtlData
}

type AfInterPanCtlData

type AfInterPanCtlData interface {
	AfInterPanCtlData()
}

type AfInterPanRegData

type AfInterPanRegData struct {
	Endpoint uint8
}

func (*AfInterPanRegData) AfInterPanCtlData

func (a *AfInterPanRegData) AfInterPanCtlData()

type AfInterPanSetData

type AfInterPanSetData struct {
	Channel uint8
}

func (*AfInterPanSetData) AfInterPanCtlData

func (a *AfInterPanSetData) AfInterPanCtlData()

type AfReflectError

type AfReflectError struct {
	Status      Status
	Endpoint    uint8
	TransID     uint8
	DstAddrMode AddrMode
	DstAddr     string `hex:"2"`
}

type AfRegister

type AfRegister struct {
	EndPoint          uint8
	AppProfID         uint16
	AppDeviceID       uint16
	AddDevVer         uint8
	LatencyReq        Latency
	AppInClusterList  []uint16 `size:"1"`
	AppOutClusterList []uint16 `size:"1"`
}

type AgingEndDevice

type AgingEndDevice struct {
	EndDevCfg     uint8
	DeviceTimeout uint32
}

type AppCnfBdbAddInstallCode

type AppCnfBdbAddInstallCode struct {
	InstallCodeFormat InstallCodeFormat
	IEEEAddr          string `hex:"8"`
	InstallCode       []uint8
}

type AppCnfBdbCommissioningNotification

type AppCnfBdbCommissioningNotification struct {
	CommissioningStatus         CommissioningStatus
	CommissioningMode           CommissioningMode
	RemainingCommissioningModes *RemainingCommissioningModes
}

type AppCnfBdbSetActiveDefaultCentralizedKey

type AppCnfBdbSetActiveDefaultCentralizedKey struct {
	UseGlobal   uint8
	InstallCode [18]uint8
}

type AppCnfBdbSetChannel

type AppCnfBdbSetChannel struct {
	IsPrimary uint8
	Channel   *Channels
}

type AppCnfBdbSetJoinUsesInstallCodeKey

type AppCnfBdbSetJoinUsesInstallCodeKey struct {
	BdbJoinUsesInstallCodeKey uint8
}

type AppCnfBdbSetTcRequireKeyExchange

type AppCnfBdbSetTcRequireKeyExchange struct {
	BdbTrustCenterRequireKeyExchange uint8
}

type AppCnfBdbStartCommissioning

type AppCnfBdbStartCommissioning struct {
	CommissioningMode CommissioningMode
}

type AppCnfSetAllowRejoinTcPolicy

type AppCnfSetAllowRejoinTcPolicy struct {
	AllowRejoin uint8
}

type AppCnfSetDefaultEndDeviceTimeout

type AppCnfSetDefaultEndDeviceTimeout struct {
	Timeout Timeout
}

type AppCnfSetEndDeviceTimeout

type AppCnfSetEndDeviceTimeout struct {
	Timeout Timeout
}

type AppCnfSetNwkFrameCounter

type AppCnfSetNwkFrameCounter struct {
	FrameCounterValue uint8
}

type AppMsg

type AppMsg struct {
	AppEndpoint uint8
	DstAddr     string `hex:"2"`
	DstEndpoint uint8
	ClusterID   uint16
	Message     []uint8 `size:"1"`
}

type AppUserTest

type AppUserTest struct {
	SrcEndpoint uint8
	CommandID   uint16
	Parameter1  uint16
	Parameter2  uint16
}

type Beacon

type Beacon struct {
	SrcAddr         string `hex:"2"`
	PanID           uint16
	LogicalChannel  uint8
	PermitJoining   uint8
	RouterCapacity  uint8
	DeviceCapacity  uint8
	ProtocolVersion uint8
	StackProfile    uint8
	LQI             uint8
	Depth           uint8
	UpdateID        uint8
	ExtendedPanID   uint64
}

type BindEntry

type BindEntry struct {
	SrcEP         uint8
	DstGroupMode  uint8
	DstIdx        uint16
	DstEP         uint8
	ClusterIDList []uint16 `size:"1"`
}

type Binding

type Binding struct {
	SrcAddr     string `hex:"8"`
	SrcEndpoint uint8
	ClusterID   uint16
	DstAddr     *Addr
}

type CapInfo

type CapInfo struct {
	AlternatePANCoordinator uint8 `bits:"0b00000001" bitmask:"start"`
	Router                  uint8 `bits:"0b00000010"`
	MainPowered             uint8 `bits:"0b00000100"`
	ReceiverOnWhenIdle      uint8 `bits:"0b00001000"`
	Reserved1               uint8 `bits:"0b00010000"`
	Reserved2               uint8 `bits:"0b00100000"`
	Security                uint8 `bits:"0b01000000"`
	AllocAddr               uint8 `bits:"0b10000000" bitmask:"end"`
}

type Capabilities

type Capabilities struct {
	Sys   uint16 `bitmask:"start" bits:"0x0001"`
	Mac   uint16 `bits:"0x0002"`
	Nwk   uint16 `bits:"0x0004"`
	Af    uint16 `bits:"0x0008"`
	Zdo   uint16 `bits:"0x0010"`
	Sapi  uint16 `bits:"0x0020"`
	Util  uint16 `bits:"0x0040"`
	Debug uint16 `bits:"0x0080"`
	App   uint16 `bits:"0x0100"`
	Zoad  uint16 `bitmask:"end" bits:"0x1000"`
}

Capabilities represents the interfaces that this device can handle (compiled into the device)

type Channel

type Channel uint8
const (
	ChannelAIN0 Channel = iota
	ChannelAIN1
	ChannelAIN2
	ChannelAIN3
	ChannelAIN4
	ChannelAIN5
	ChannelAIN6
	ChannelAIN7
	ChannelTemperatureSensor Channel = 0x0E + iota
	ChannelVoltageReading
)

func (Channel) String

func (i Channel) String() string

type Channels

type Channels struct {
	Channel11 uint32 `bits:"0x00000800" bitmask:"start"`
	Channel12 uint32 `bits:"0x00001000"`
	Channel13 uint32 `bits:"0x00002000"`
	Channel14 uint32 `bits:"0x00004000"`
	Channel15 uint32 `bits:"0x00008000"`
	Channel16 uint32 `bits:"0x00010000"`
	Channel17 uint32 `bits:"0x00020000"`
	Channel18 uint32 `bits:"0x00040000"`
	Channel19 uint32 `bits:"0x00080000"`
	Channel20 uint32 `bits:"0x00100000"`
	Channel21 uint32 `bits:"0x00200000"`
	Channel22 uint32 `bits:"0x00400000"`
	Channel23 uint32 `bits:"0x00800000"`
	Channel24 uint32 `bits:"0x01000000"`
	Channel25 uint32 `bits:"0x02000000"`
	Channel26 uint32 `bits:"0b04000000" bitmask:"end"`
}

type CommissioningMode

type CommissioningMode uint8
const (
	CommissioningModeInitialization    CommissioningMode = 0x00
	CommissioningModeTouchLink         CommissioningMode = 0x01
	CommissioningModeNetworkSteering   CommissioningMode = 0x02
	CommissioningModeNetworkFormation  CommissioningMode = 0x04
	CommissioningModeFindingAndBinding CommissioningMode = 0x08
)

func (CommissioningMode) String

func (i CommissioningMode) String() string

type CommissioningStatus

type CommissioningStatus uint8
const (
	CommissioningStatusSuccess                   CommissioningStatus = 0x00
	CommissioningStatusInProgress                CommissioningStatus = 0x01
	CommissioningStatusNoNetwork                 CommissioningStatus = 0x02
	CommissioningStatusTlTargetFailure           CommissioningStatus = 0x03
	CommissioningStatusTlNotAaCapable            CommissioningStatus = 0x04
	CommissioningStatusTlNoScanResponse          CommissioningStatus = 0x05
	CommissioningStatusTlNotPermitted            CommissioningStatus = 0x06
	CommissioningStatusTclkExFailure             CommissioningStatus = 0x07
	CommissioningStatusFormationFailure          CommissioningStatus = 0x08
	CommissioningStatusFbTargetInProgress        CommissioningStatus = 0x09
	CommissioningStatusFbInitiatorInProgress     CommissioningStatus = 0x0A
	CommissioningStatusFbNoIdentifyQueryResponse CommissioningStatus = 0x0B
	CommissioningStatusFbBindingTableFull        CommissioningStatus = 0x0C
	CommissioningStatusNetwork                   CommissioningStatus = 0x0D
)

func (CommissioningStatus) String

func (i CommissioningStatus) String() string

type DebugMsg

type DebugMsg struct {
	String string `size:"1"`
}

type DebugSetThreshold

type DebugSetThreshold struct {
	ComponentID uint8
	Threshold   uint8
}

type Device

type Device struct {
	ShortAddr      string `hex:"2"` // Short address of associated device, or invalid 0xfffe
	AddrIdx        uint16 // Index from the address manager
	NodeRelation   uint8
	DevStatus      uint8 // bitmap of various status values
	AssocCnt       uint8
	Age            uint8
	LinkInfo       *LinkInfo
	EndDev         *AgingEndDevice
	TimeoutCounter uint32
	KeepaliveRcv   uint8
}

type DeviceState

type DeviceState uint8
const (
	DeviceStateInitializedNotStartedAutomatically DeviceState = iota
	DeviceStateInitializedNotConnectedToAnything
	DeviceStateDiscoveringPANsToJoin
	DeviceStateJoiningPAN
	DeviceStateRejoiningPAN
	DeviceStateJoinedButNotAuthenticated
	DeviceStateStartedAsDeviceAfterAuthentication
	DeviceStateDeviceJoinedAuthenticatedAndIsRouter
	DeviceStateStartingAsZigBeeCoordinator
	DeviceStateStartedAsZigBeeCoordinator
	DeviceStateDeviceHasLostInformationAboutItsParent
	DeviceStateDeviceSendingKeepAliveToParent
	DeviceStateDeviceWaitingBeforeRejoin
	DeviceStateReJoiningPANInSecureModeScanningAllChannels
	DeviceStateReJoiningPANInTrustCenterModeScanningCurrentChannel
	DeviceStateReJoiningPANInTrustCenterModeScanningAllChannels
)

func (DeviceState) String

func (i DeviceState) String() string

type DeviceType

type DeviceType struct {
	Coordinator uint8 `bits:"0x01" bitmask:"start"`
	Router      uint8 `bits:"0x02"`
	EndDevice   uint8 `bits:"0x04" bitmask:"end"`
}

type EmptyResponse

type EmptyResponse struct{}

type GpAction

type GpAction uint8
const (
	GpActionAddGPDFIntoQueue    GpAction = 0x00
	GpActionRemoveGPDFFromQueue GpAction = 0x01
)

func (GpAction) String

func (i GpAction) String() string

type GpDataCnf

type GpDataCnf struct {
	Status       Status
	GPMPDUHandle uint8
}

type GpDataInd

type GpDataInd struct {
	Status      GpDataIndStatus
	RSSI        uint8
	LinkQuality uint8
	SeqNumber   uint8
	SrcAddrMode AddrMode
	SrcPANId    uint16
	SrcAddress  string `hex:"8"`
	DstAddrMode AddrMode
	DstPANId    uint16
	DstAddress  string  `hex:"8"`
	GPMPDU      []uint8 `size:"1"`
}

type GpDataIndStatus

type GpDataIndStatus uint8
const (
	GpDataIndStatusSecuritySuccess GpDataIndStatus = 0x00
	GpDataIndStatusNoSecurity      GpDataIndStatus = 0x01
	GpDataIndStatusCounterFailure  GpDataIndStatus = 0x02
	GpDataIndStatusAuthFailure     GpDataIndStatus = 0x03
	GpDataIndStatusUnprocessed     GpDataIndStatus = 0x04
)

func (GpDataIndStatus) String

func (i GpDataIndStatus) String() string

type GpDataReq

type GpDataReq struct {
	Action                 GpAction
	TxOptions              *TxOptions
	ApplicationID          uint8
	SrcID                  uint32
	GPDIEEEAddress         string `hex:"8"`
	Endpoint               uint8
	GPDCommandID           uint8
	GPDASDU                []uint8 `size:"1"`
	GPEPHandle             uint8
	GPTxQueueEntryLifetime uint32 `bound:"3"`
}

type GpSecReq

type GpSecReq struct {
	ApplicationID           uint8
	SrcID                   uint32
	GPDIEEEAddress          string `hex:"8"`
	Endpoint                uint8
	GPDFSecurityLevel       uint8
	GPDFKeyType             uint8
	GPDSecurityFrameCounter uint32
	DGPStubHandle           uint8
}

type GpSecRsp

type GpSecRsp struct {
	Status                  GpStatus
	DGPStubHandle           uint8
	ApplicationID           uint8
	SrcID                   uint32
	GPDIEEEAddress          string `hex:"8"`
	Endpoint                uint8
	GPDFSecurityLevel       uint8
	GPDFKeyType             uint8
	GPDKey                  [16]uint8
	GPDSecurityFrameCounter uint32
}

type GpStatus

type GpStatus uint8
const (
	GpStatusDropFrame       GpStatus = 0x00
	GpStatusMatch           GpStatus = 0x01
	GpStatusPassUnprocessed GpStatus = 0x02
	GpStatusTxThenDrop      GpStatus = 0x03
	GpStatusError           GpStatus = 0x04
)

func (GpStatus) String

func (i GpStatus) String() string

type InstallCodeFormat

type InstallCodeFormat uint8
const (
	InstallCodeFormatCodePlusCrc               InstallCodeFormat = 0x00
	InstallCodeFormatKeyDerivedFromInstallCode InstallCodeFormat = 0x01
)

func (InstallCodeFormat) String

func (i InstallCodeFormat) String() string

type InterPanCommand

type InterPanCommand uint8
const (
	InterPanCommandInterPanClr InterPanCommand = iota
	InterPanCommandInterPanSet
	InterPanCommandInterPanReg
	InterPanCommandInterPanChk
)

func (InterPanCommand) String

func (i InterPanCommand) String() string

type Keys

type Keys struct {
	Key1 uint8 `bits:"0x01" bitmask:"start"`
	Key2 uint8 `bits:"0x02"`
	Key3 uint8 `bits:"0x04"`
	Key4 uint8 `bits:"0x08"`
	Key5 uint8 `bits:"0x10"`
	Key6 uint8 `bits:"0x20"`
	Key7 uint8 `bits:"0x40"`
	Key8 uint8 `bits:"0x80" bitmask:"end"`
}

type Latency

type Latency uint8
const (
	LatencyNoLatency Latency = iota
	LatencyFastBeacons
	LatencySlowBeacons
)

func (Latency) String

func (i Latency) String() string

type LinkInfo

type LinkInfo struct {
	TxCounter uint8 // Counter of transmission success/failures
	TxCost    uint8 // Average of sending rssi values if link staus is enabled
	// i.e. NWK_LINK_STATUS_PERIOD is defined as non zero
	RxLqi uint8 // average of received rssi values
	// needs to be converted to link cost (1-7) before used
	InKeySeqNum uint8  // security key sequence number
	InFrmCntr   uint32 // security frame counter..
	TxFailure   uint16 // higher values indicate more failures
}

type LogicalType

type LogicalType uint8
const (
	LogicalTypeCoordinator LogicalType = 0
	LogicalTypeRouter      LogicalType = 1
	LogicalTypeeEndDevice  LogicalType = 2
)

func (LogicalType) String

func (i LogicalType) String() string

type LqiDeviceType

type LqiDeviceType uint8
const (
	LqiDeviceTypeCoordinator LqiDeviceType = 0x00
	LqiDeviceTypeRouter      LqiDeviceType = 0x01
	LqiDeviceTypeEndDevice   LqiDeviceType = 0x02
)

func (LqiDeviceType) String

func (i LqiDeviceType) String() string

type Mode

type Mode uint8
const (
	ModeOFF Mode = 0
	ModeON  Mode = 1
)

func (Mode) String

func (i Mode) String() string

type NeighborLqi

type NeighborLqi struct {
	ExtendedPanID   uint64
	ExtendedAddress string        `hex:"8"`
	NetworkAddress  string        `hex:"2"`
	DeviceType      LqiDeviceType `bits:"0b00000011" bitmask:"start"`
	RxOnWhenIdle    uint8         `bits:"0b00001100"`
	Relationship    uint8         `bits:"0b00110000" bitmask:"end"`
	PermitJoining   uint8
	Depth           uint8
	LQI             uint8
}

type Network

type Network struct {
	PanID           uint16 `bound:"8"`
	LogicalChannel  uint8
	StackProfile    uint8 `bits:"0b00001111" bitmask:"start"`
	ZigbeeVersion   uint8 `bits:"0b11110000" bitmask:"end"`
	BeaconOrder     uint8 `bits:"0b00001111" bitmask:"start"`
	SuperFrameOrder uint8 `bits:"0b11110000" bitmask:"end"`
	PermitJoin      uint8
}

type NvInfoStatus

type NvInfoStatus struct {
	IEEEAddress   Status `bits:"0b00000001" bitmask:"start"`
	ScanChannels  Status `bits:"0b00000010"`
	PanID         Status `bits:"0b00000100"`
	SecurityLevel Status `bits:"0b00001000"`
	PreConfigKey  Status `bits:"0b00010000" bitmask:"end"`
}

type Operation

type Operation uint8
const (
	OperationSetDirection Operation = iota
	OperationSetInputMode
	OperationSet
	OperationClear
	OperationToggle
	OperationRead
)

func (Operation) String

func (i Operation) String() string

type Reason

type Reason uint8
const (
	ReasonPowerUp Reason = iota
	ReasonExternal
	ReasonWatchDog
)

func (Reason) String

func (i Reason) String() string

type Relation

type Relation uint8
const (
	RelationParent Relation = iota
	RelationChildRfd
	RelationChildRfdRxIdle
	RelationChildFfd
	RelationChildFfdRxIdle
	RelationNeighbor
	RelationOther
)

func (Relation) String

func (i Relation) String() string

type RemainingCommissioningModes

type RemainingCommissioningModes struct {
	InitiatorTl    uint8 `bits:"0x01" bitmask:"start"`
	NwkSteering    uint8 `bits:"0x02"`
	NwkFormation   uint8 `bits:"0x04"`
	FindingBinding uint8 `bits:"0x08"`
	Initialization uint8 `bits:"0x10"`
	ParentLost     uint8 `bits:"0x20" bitmask:"end"`
}

type RemoveChildrenRejoin

type RemoveChildrenRejoin struct {
	Rejoin         uint8 `bits:"0b00000001" bitmask:"start"`
	RemoveChildren uint8 `bits:"0b00000010" bitmask:"end"`
}

type ReqType

type ReqType uint8
const (
	ReqTypeSingleDeviceResponse      ReqType = 0x00
	ReqTypeAssociatedDevicesResponse ReqType = 0x01
)

func (ReqType) String

func (i ReqType) String() string

type Resolution

type Resolution uint8
const (
	Resolution8Bit Resolution = iota
	Resolution10Bit
	Resolution12Bit
	Resolution14Bit
)

func (Resolution) String

func (i Resolution) String() string

type Route

type Route struct {
	DestinationAddress string `hex:"2"`
	Status             RouteStatus
	NextHop            string `hex:"2"`
}

type RouteStatus

type RouteStatus uint8
const (
	RouteStatusActive            RouteStatus = 0x00
	RouteStatusDiscoveryUnderway RouteStatus = 0x01
	RouteStatusDiscoveryFailed   RouteStatus = 0x02
	RouteStatusInactive          RouteStatus = 0x03
)

func (RouteStatus) String

func (i RouteStatus) String() string

type SapiZbAllowBind

type SapiZbAllowBind struct {
	Timeout uint8
}

type SapiZbAllowBindConfirm

type SapiZbAllowBindConfirm struct {
	Source string `hex:"2"`
}

type SapiZbBindConfirm

type SapiZbBindConfirm struct {
	CommandID uint16
	Status    Status
}

type SapiZbBindDevice

type SapiZbBindDevice struct {
	Create      uint8
	CommandID   uint16
	Destination string `hex:"8"`
}

type SapiZbFindDeviceConfirm

type SapiZbFindDeviceConfirm struct {
	SearchType uint8
	Result     string `hex:"2"`
	SearchKey  string `hex:"8"`
}

type SapiZbFindDeviceRequest

type SapiZbFindDeviceRequest struct {
	SearchKey string `hex:"8"`
}

type SapiZbGetDeviceInfo

type SapiZbGetDeviceInfo struct {
	Param uint8
}

type SapiZbGetDeviceInfoResponse

type SapiZbGetDeviceInfoResponse struct {
	Param uint8
	Value uint16
}

type SapiZbPermitJoiningRequest

type SapiZbPermitJoiningRequest struct {
	Destination string `hex:"2"`
	Timeout     uint8
}

type SapiZbReadConfiguration

type SapiZbReadConfiguration struct {
	ConfigID uint8
}

type SapiZbReadConfigurationResponse

type SapiZbReadConfigurationResponse struct {
	Status   Status
	ConfigID uint8
	Value    []uint8 `size:"1"`
}

type SapiZbReceiveDataIndication

type SapiZbReceiveDataIndication struct {
	Source    string `hex:"2"`
	CommandID uint16
	Data      []uint8 `size:"1"`
}

type SapiZbSendDataConfirm

type SapiZbSendDataConfirm struct {
	Handle uint8
	Status Status
}

type SapiZbSendDataRequest

type SapiZbSendDataRequest struct {
	Destination string `hex:"2"`
	CommandID   uint16
	Handle      uint8
	Ack         uint8
	Radius      uint8
	Data        []uint8 `size:"1"`
}

type SapiZbStartConfirm

type SapiZbStartConfirm struct {
	Status Status
}

type SapiZbWriteConfiguration

type SapiZbWriteConfiguration struct {
	ConfigID uint8
	Value    []uint8 `size:"1"`
}

type ServerMask

type ServerMask struct {
	PrimTrustCenter uint16 `bits:"0x01" bitmask:"start"`
	BkupTrustCenter uint16 `bits:"0x02"`
	PrimBindTable   uint16 `bits:"0x04"`
	BkupBindTable   uint16 `bits:"0x08"`
	PrimDiscTable   uint16 `bits:"0x10"`
	BkupDiscTable   uint16 `bits:"0x20"`
	NetworkManager  uint16 `bits:"0x40" bitmask:"end"`
}

type Shift

type Shift uint8
const (
	ShiftNoShift  Shift = 0
	ShiftYesShift Shift = 1
)

func (Shift) String

func (i Shift) String() string

type StartupFromAppStatus

type StartupFromAppStatus uint8
const (
	StartupFromAppStatusRestoredNetworkState StartupFromAppStatus = 0x00
	StartupFromAppStatusNewNetworkState      StartupFromAppStatus = 0x01
	StartupFromAppStatusLeaveAndNotStarted   StartupFromAppStatus = 0x02
)

func (StartupFromAppStatus) String

func (i StartupFromAppStatus) String() string

type Status

type Status uint8
const (
	StatusSuccess          Status = 0x00
	StatusFailure          Status = 0x01
	StatusInvalidParameter Status = 0x02

	StatusItemCreatedAndInitialized Status = 0x09
	StatusInitializationFailed      Status = 0x0a
	StatusBadLength                 Status = 0x0c

	// ZStack status values must start at 0x10, after the generic status values (defined in comdef.h)
	StatusMemError        Status = 0x10
	StatusBufferFull      Status = 0x11
	StatusUnsupportedMode Status = 0x12
	StatusMacMemError     Status = 0x13

	StatusSapiInProgress Status = 0x20
	StatusSapiTimeout    Status = 0x21
	StatusSapiInit       Status = 0x22

	StatusNotAuthorized Status = 0x7E

	StatusMalformedCmd    Status = 0x80
	StatusUnsupClusterCmd Status = 0x81

	StatusZdpInvalidEp         Status = 0x82 // Invalid endpoint value
	StatusZdpNotActive         Status = 0x83 // Endpoint not described by a simple desc.
	StatusZdpNotSupported      Status = 0x84 // Optional feature not supported
	StatusZdpTimeout           Status = 0x85 // Operation has timed out
	StatusZdpNoMatch           Status = 0x86 // No match for end device bind
	StatusZdpNoEntry           Status = 0x88 // Unbind request failed, no entry
	StatusZdpNoDescriptor      Status = 0x89 // Child descriptor not available
	StatusZdpInsufficientSpace Status = 0x8a // Insufficient space to support operation
	StatusZdpNotPermitted      Status = 0x8b // Not in proper state to support operation
	StatusZdpTableFull         Status = 0x8c // No table space to support operation
	StatusZdpNotAuthorized     Status = 0x8d // Permissions indicate request not authorized
	StatusZdpBindingTableFull  Status = 0x8e // No binding table space to support operation

	// OTA Status values
	StatusOtaAbort            Status = 0x95
	StatusOtaImageInvalid     Status = 0x96
	StatusOtaWaitForData      Status = 0x97
	StatusOtaNoImageAvailable Status = 0x98
	StatusOtaRequireMoreImage Status = 0x99

	// APS status values
	StatusApsFail              Status = 0xb1
	StatusApsTableFull         Status = 0xb2
	StatusApsIllegalRequest    Status = 0xb3
	StatusApsInvalidBinding    Status = 0xb4
	StatusApsUnsupportedAttrib Status = 0xb5
	StatusApsNotSupported      Status = 0xb6
	StatusApsNoAck             Status = 0xb7
	StatusApsDuplicateEntry    Status = 0xb8
	StatusApsNoBoundDevice     Status = 0xb9
	StatusApsNotAllowed        Status = 0xba
	StatusApsNotAuthenticated  Status = 0xbb

	// Security status values
	StatusSecNoKey       Status = 0xa1
	StatusSecOldFrmCount Status = 0xa2
	StatusSecMaxFrmCount Status = 0xa3
	StatusSecCcmFail     Status = 0xa4
	StatusSecFailure     Status = 0xad

	// NWK status values
	StatusNwkInvalidParam         Status = 0xc1
	StatusNwkInvalidRequest       Status = 0xc2
	StatusNwkNotPermitted         Status = 0xc3
	StatusNwkStartupFailure       Status = 0xc4
	StatusNwkAlreadyPresent       Status = 0xc5
	StatusNwkSyncFailure          Status = 0xc6
	StatusNwkTableFull            Status = 0xc7
	StatusNwkUnknownDevice        Status = 0xc8
	StatusNwkUnsupportedAttribute Status = 0xc9
	StatusNwkNoNetworks           Status = 0xca
	StatusNwkLeaveUnconfirmed     Status = 0xcb
	StatusNwkNoAck                Status = 0xcc // not in spec
	StatusNwkNoRoute              Status = 0xcd

	// MAC status values
	// ZMacSuccess              Status = 0x00
	StatusMacBeaconLoss           Status = 0xe0
	StatusMacChannelAccessFailure Status = 0xe1
	StatusMacDenied               Status = 0xe2
	StatusMacDisableTrxFailure    Status = 0xe3
	StatusMacFailedSecurityCheck  Status = 0xe4
	StatusMacFrameTooLong         Status = 0xe5
	StatusMacInvalidGTS           Status = 0xe6
	StatusMacInvalidHandle        Status = 0xe7
	StatusMacInvalidParameter     Status = 0xe8
	StatusMacNoACK                Status = 0xe9
	StatusMacNoBeacon             Status = 0xea
	StatusMacNoData               Status = 0xeb
	StatusMacNoShortAddr          Status = 0xec
	StatusMacOutOfCap             Status = 0xed
	StatusMacPANIDConflict        Status = 0xee
	StatusMacRealignment          Status = 0xef
	StatusMacTransactionExpired   Status = 0xf0
	StatusMacTransactionOverFlow  Status = 0xf1
	StatusMacTxActive             Status = 0xf2
	StatusMacUnAvailableKey       Status = 0xf3
	StatusMacUnsupportedAttribute Status = 0xf4
	StatusMacUnsupported          Status = 0xf5
	StatusMacSrcMatchInvalidIndex Status = 0xff
)

func (Status) String

func (i Status) String() string

type StatusResponse

type StatusResponse struct {
	Status Status
}

type SubsystemId

type SubsystemId uint16
const (
	SubsystemIdSys           SubsystemId = 0x0100
	SubsystemIdMac           SubsystemId = 0x0200
	SubsystemIdNwk           SubsystemId = 0x0300
	SubsystemIdAf            SubsystemId = 0x0400
	SubsystemIdZdo           SubsystemId = 0x0500
	SubsystemIdSapi          SubsystemId = 0x0600
	SubsystemIdUtil          SubsystemId = 0x0700
	SubsystemIdDebug         SubsystemId = 0x0800
	SubsystemIdApp           SubsystemId = 0x0900
	SubsystemIdAllSubsystems SubsystemId = 0xFFFF
)

func (SubsystemId) String

func (i SubsystemId) String() string

type SysAdcRead

type SysAdcRead struct {
	Channel    Channel
	Resolution Resolution
}

type SysAdcReadResponse

type SysAdcReadResponse struct {
	Value uint16
}

type SysGetExtAddrResponse

type SysGetExtAddrResponse struct {
	ExtAddress string `hex:"8"` //The device’s extended address.
}

type SysGpio

type SysGpio struct {
	Operation Operation
	Value     uint8
}

type SysGpioResponse

type SysGpioResponse struct {
	Value uint8
}

type SysNvCompact

type SysNvCompact struct {
	Threshold uint16
}

type SysNvCreate

type SysNvCreate struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
	Length uint32
}

type SysNvDelete

type SysNvDelete struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
}

type SysNvLength

type SysNvLength struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
}

type SysNvLengthResponse

type SysNvLengthResponse struct {
	Length uint8
}

type SysNvRead

type SysNvRead struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
	Offset uint16
	Length uint8
}

type SysNvReadExt

type SysNvReadExt struct {
	ID     uint16
	Offset uint16
}

type SysNvReadResponse

type SysNvReadResponse struct {
	Status Status
	Value  []uint8 `size:"1"`
}

type SysNvUpdate

type SysNvUpdate struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
	Value  []uint8 `size:"1"`
}

type SysNvWrite

type SysNvWrite struct {
	SysID  uint8
	ItemID uint16
	SubID  uint16
	Offset uint16
	Value  []uint8 `size:"1"`
}

type SysNvWriteExt

type SysNvWriteExt struct {
	ID     uint16
	Offset uint16
	Value  []uint8 `size:"1"`
}

type SysOsalNvDelete

type SysOsalNvDelete struct {
	ID      uint16
	ItemLen uint16
}

type SysOsalNvItemInit

type SysOsalNvItemInit struct {
	ID       uint16
	ItemLen  uint16
	InitData []uint8 `size:"1"`
}

type SysOsalNvLength

type SysOsalNvLength struct {
	ID uint16
}

type SysOsalNvLengthResponse

type SysOsalNvLengthResponse struct {
	Length uint16
}

type SysOsalNvRead

type SysOsalNvRead struct {
	ID     uint16
	Offset uint8
}

type SysOsalNvReadResponse

type SysOsalNvReadResponse struct {
	Status Status
	Value  []uint8 `size:"1"`
}

type SysOsalNvWrite

type SysOsalNvWrite struct {
	ID     uint16
	Offset uint8
	Value  []uint8 `size:"1"`
}

type SysOsalStartTimer

type SysOsalStartTimer struct {
	ID      uint8
	Timeout uint16
}

type SysOsalStopTimer

type SysOsalStopTimer struct {
	ID uint8
}

type SysOsalTimerExpired

type SysOsalTimerExpired struct {
	ID uint8
}

type SysPingResponse

type SysPingResponse struct {
	Capabilities *Capabilities
}

type SysRamRead

type SysRamRead struct {
	Address uint16 //Address of the memory that will be read.
	Len     uint8  //The number of bytes that will be read from the target RAM.
}

type SysRamReadResponse

type SysRamReadResponse struct {
	Status uint8   //Status is either Success (0) or Failure (1).
	Value  []uint8 `size:"1"` //The value read from the target RAM.
}

type SysRamWrite

type SysRamWrite struct {
	Address uint16  //Address of the memory that will be written.
	Value   []uint8 `size:"1"` //The value written to the target RAM.
}

type SysRandomResponse

type SysRandomResponse struct {
	Value uint16
}

type SysResetInd

type SysResetInd struct {
	Reason       Reason
	TransportRev uint8
	Product      uint8
	MinorRel     uint8
	HwRev        uint8
}

type SysResetReq

type SysResetReq struct {
	//This command will reset the device by using a hardware reset (i.e.
	//watchdog reset) if ‘Type’ is zero. Otherwise a soft reset (i.e. a jump to the
	//reset vector) is done. This is especially useful in the CC2531, for
	//instance, so that the USB host does not have to contend with the USB
	//H/W resetting (and thus causing the USB host to re-enumerate the device
	//which can cause an open virtual serial port to hang.)
	ResetType byte
}

type SysSetExtAddr

type SysSetExtAddr struct {
	ExtAddress string `hex:"8"` //The device’s extended address.
}

type SysSetTxPower

type SysSetTxPower struct {
	TXPower uint8
}

type SysSetTxPowerResponse

type SysSetTxPowerResponse struct {
	TXPower uint8
}

type SysTime

type SysTime struct {
	UTCTime uint32
	Hour    uint8
	Minute  uint8
	Second  uint8
	Month   uint8
	Day     uint8
	Year    uint16
}

type SysVersionResponse

type SysVersionResponse struct {
	TransportRev uint8 //Transport protocol revision
	Product      uint8 //Product Id
	MajorRel     uint8 //Software major release number
	MinorRel     uint8 //Software minor release number
	MaintRel     uint8 //Software maintenance release number
}

type SysZDiagsClearStats

type SysZDiagsClearStats struct {
	ClearNV uint8
}

type SysZDiagsClearStatsResponse

type SysZDiagsClearStatsResponse struct {
	SysClock uint32
}

type SysZDiagsGetStats

type SysZDiagsGetStats struct {
	AttributeID uint16
}

type SysZDiagsGetStatsResponse

type SysZDiagsGetStatsResponse struct {
	AttributeValue uint32
}

type SysZDiagsSaveStatsToNvResponse

type SysZDiagsSaveStatsToNvResponse struct {
	SysClock uint32
}

type Timeout

type Timeout uint8
const (
	Timeout10Seconds    Timeout = 0x00
	Timeout2Minutes     Timeout = 0x01
	Timeout4Minutes     Timeout = 0x02
	Timeout8Minutes     Timeout = 0x03
	Timeout16Minutes    Timeout = 0x04
	Timeout32Minutes    Timeout = 0x05
	Timeout64Minutes    Timeout = 0x06
	Timeout128Minutes   Timeout = 0x07
	Timeout256Minutes   Timeout = 0x08 //(Default)
	Timeout512Minutes   Timeout = 0x09
	Timeout1024Minutes  Timeout = 0x0A
	Timeout2048Minutes  Timeout = 0x0B
	Timeout4096Minutes  Timeout = 0x0C
	Timeout8192Minutes  Timeout = 0x0D
	Timeout16384Minutes Timeout = 0x0E
)

func (Timeout) String

func (i Timeout) String() string

type TxOptions

type TxOptions struct {
	UseGpTxQueue         uint8 `bits:"0b00000001" bitmask:"start"`
	UseCSMAorCA          uint8 `bits:"0b00000010"`
	UseMacAck            uint8 `bits:"0b00000100"`
	GPDFFrameTypeForTx   uint8 `bits:"0b00011000"`
	TxOnMatchingEndpoint uint8 `bits:"0b00100000" bitmask:"end"`
}

type UtilAddrMgrAddrLookup

type UtilAddrMgrAddrLookup struct {
	NwkAddr string `hex:"2"`
}

type UtilAddrMgrAddrLookupResponse

type UtilAddrMgrAddrLookupResponse struct {
	ExtAddr string `hex:"8"`
}

type UtilAddrMgrExtAddrLookup

type UtilAddrMgrExtAddrLookup struct {
	ExtAddr string `hex:"8"`
}

type UtilAddrMgrExtAddrLookupResponse

type UtilAddrMgrExtAddrLookupResponse struct {
	NwkAddr string `hex:"2"`
}

type UtilApsmeLinkKeyDataGet

type UtilApsmeLinkKeyDataGet struct {
	ExtAddr string `hex:"8"`
}

type UtilApsmeLinkKeyDataGetResponse

type UtilApsmeLinkKeyDataGetResponse struct {
	Status    Status
	SecKey    [16]uint8
	TxFrmCntr uint32
	RxFrmCntr uint32
}

type UtilApsmeLinkKeyNvIdGet

type UtilApsmeLinkKeyNvIdGet struct {
	ExtAddr string `hex:"8"`
}

type UtilApsmeLinkKeyNvIdGetResponse

type UtilApsmeLinkKeyNvIdGetResponse struct {
	Status      Status
	LinkKeyNvId uint16
}

type UtilApsmeRequestKeyCmd

type UtilApsmeRequestKeyCmd struct {
	PartnerAddr string `hex:"8"`
}

type UtilAssocCount

type UtilAssocCount struct {
	StartRelation Relation
	EndRelation   Relation
}

type UtilAssocCountResponse

type UtilAssocCountResponse struct {
	Count uint16
}

type UtilAssocFindDevice

type UtilAssocFindDevice struct {
	Number uint8
}

type UtilAssocFindDeviceResponse

type UtilAssocFindDeviceResponse struct {
	Device *Device
}

type UtilAssocGetWithAddr

type UtilAssocGetWithAddr struct {
	ExtAddr string `hex:"8"`
	NwkAddr string `hex:"2"`
}

type UtilAssocGetWithAddrResponse

type UtilAssocGetWithAddrResponse struct {
	Device *Device
}

type UtilBindAddEntry

type UtilBindAddEntry struct {
	AddrMode    AddrMode
	DstAddr     string `hex:"8"`
	DstEndpoint uint8
	ClusterIDs  []uint16 `size:"1"`
}

type UtilBindAddEntryResponse

type UtilBindAddEntryResponse struct {
	BindEntry *BindEntry
}

type UtilCallbackSubCmd

type UtilCallbackSubCmd struct {
	SubsystemID SubsystemId
	Action      Action
}

type UtilDataReq

type UtilDataReq struct {
	SecurityUse uint8
}

type UtilGetDeviceInfoResponse

type UtilGetDeviceInfoResponse struct {
	Status           Status
	IEEEAddr         string `hex:"8"`
	ShortAddr        string `hex:"2"`
	DeviceType       *DeviceType
	DeviceState      DeviceState
	AssocDevicesList []string `size:"1" hex:"2"`
}

type UtilGetNvInfoResponse

type UtilGetNvInfoResponse struct {
	Status        *NvInfoStatus
	IEEEAddr      string `hex:"8"`
	ScanChannels  uint32
	PanID         uint16
	SecurityLevel uint8
	PreConfigKey  [16]uint8
}

type UtilKeyEvent

type UtilKeyEvent struct {
	Keys  *Keys
	Shift Shift
}

type UtilLedControl

type UtilLedControl struct {
	LedID uint8
	Mode  Mode
}

type UtilLoopback

type UtilLoopback struct {
	Data []uint8
}

type UtilSetChannels

type UtilSetChannels struct {
	Channels *Channels
}

type UtilSetPanId

type UtilSetPanId struct {
	PanID uint16
}

type UtilSetPreCfgKey

type UtilSetPreCfgKey struct {
	PreCfgKey [16]uint8
}

type UtilSetSecLevel

type UtilSetSecLevel struct {
	SecLevel uint8
}

type UtilSrcMatchAckAllPending

type UtilSrcMatchAckAllPending struct {
	Option Action
}

type UtilSrcMatchAddEntry

type UtilSrcMatchAddEntry struct {
	AddrMode AddrMode
	Address  string `hex:"8"`
	PanID    uint16
}

type UtilSrcMatchCheckAllPendingResponse

type UtilSrcMatchCheckAllPendingResponse struct {
	Status Status
	Value  uint8
}

type UtilSrcMatchCheckSrcAddr

type UtilSrcMatchCheckSrcAddr struct {
	AddrMode AddrMode
	Address  string `hex:"8"`
	PanID    uint16
}

type UtilSrcMatchDelEntry

type UtilSrcMatchDelEntry struct {
	AddrMode AddrMode
	Address  string `hex:"8"`
	PanID    uint16
}

type UtilSrngGenResponse

type UtilSrngGenResponse struct {
	SecureRandomNumbers [100]uint8
}

type UtilSyncReq

type UtilSyncReq struct{}

type UtilTimeAliveResponse

type UtilTimeAliveResponse struct {
	Seconds uint32
}

type UtilZclKeyEstInitEst

type UtilZclKeyEstInitEst struct {
	TaskID   uint8
	SeqNum   uint8
	EndPoint uint8
	AddrMode AddrMode
	Addr     string `hex:"8"`
}

type UtilZclKeyEstSign

type UtilZclKeyEstSign struct {
	Input []uint8 `size:"1"`
}

type UtilZclKeyEstSignResponse

type UtilZclKeyEstSignResponse struct {
	Status Status
	Key    [42]uint8
}

type UtilZclKeyEstablishInd

type UtilZclKeyEstablishInd struct {
	TaskId   uint8
	Event    uint8
	Status   uint8
	WaitTime uint8
	Suite    uint16
}

type ZdoActiveEpReq

type ZdoActiveEpReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
}

type ZdoActiveEpRsp

type ZdoActiveEpRsp struct {
	SrcAddr      string `hex:"2"`
	Status       Status
	NWKAddr      string  `hex:"2"`
	ActiveEPList []uint8 `size:"1"`
}

type ZdoBeaconNotifyInd

type ZdoBeaconNotifyInd struct {
	BeaconList []*Beacon `size:"1"`
}

type ZdoBindRsp

type ZdoBindRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoBindUnbindReq

type ZdoBindUnbindReq struct {
	DstAddr     string `hex:"2"`
	SrcAddress  string `hex:"8"`
	SrcEndpoint uint8
	ClusterID   uint16
	DstAddrMode AddrMode
	DstAddress  string `hex:"8"`
	DstEndpoint uint8
}

type ZdoComplexDescReq

type ZdoComplexDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
}

type ZdoComplexDescRsp

type ZdoComplexDescRsp struct {
	SrcAddr           string `hex:"2"`
	Status            Status
	NWKAddr           string `hex:"2"`
	ComplexDescriptor string `size:"1"`
}

type ZdoEndDeviceAnnce

type ZdoEndDeviceAnnce struct {
	NwkAddr      string `hex:"2"`
	IEEEAddr     string `hex:"8"`
	Capabilities *CapInfo
}

type ZdoEndDeviceAnnceInd

type ZdoEndDeviceAnnceInd struct {
	SrcAddr      string `hex:"2"`
	NwkAddr      string `hex:"2"`
	IEEEAddr     string `hex:"8"`
	Capabilities *CapInfo
}

type ZdoEndDeviceBindReq

type ZdoEndDeviceBindReq struct {
	DstAddr              string `hex:"2"`
	LocalCoordinatorAddr string `hex:"2"`
	IEEEAddr             string `hex:"8"`
	Endpoint             uint8
	ProfileID            uint16
	InClusterList        []uint16 `size:"1"`
	OutClusterList       []uint16 `size:"1"`
}

type ZdoEndDeviceBindRsp

type ZdoEndDeviceBindRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoExtAddGroup

type ZdoExtAddGroup struct {
	Endpoint  uint8
	GroupID   uint16
	GroupName string `size:"1"`
}

type ZdoExtCountAllGroupsResponse

type ZdoExtCountAllGroupsResponse struct {
	Count uint8
}

type ZdoExtFindAllGroupsEndpoint

type ZdoExtFindAllGroupsEndpoint struct {
	Endpoint  uint8
	GroupList []uint16 `size:"1"`
}

type ZdoExtFindAllGroupsEndpointResponse

type ZdoExtFindAllGroupsEndpointResponse struct {
	Groups []uint16 `size:"1"`
}

type ZdoExtFindGroup

type ZdoExtFindGroup struct {
	Endpoint uint8
	GroupID  uint16
}

type ZdoExtFindGroupResponse

type ZdoExtFindGroupResponse struct {
	Status  Status
	GroupID uint16
	Name    string `size:"1"`
}

type ZdoExtNwkInfoResponse

type ZdoExtNwkInfoResponse struct {
	ShortAddress          string `hex:"2"`
	PanID                 uint16
	ParentAddress         string `hex:"2"`
	ExtendedPanID         uint64
	ExtendedParentAddress string `hex:"8"`
	Channel               uint16 //uint16 or uint8?????
}

type ZdoExtRemoveAllGroup

type ZdoExtRemoveAllGroup struct {
	Endpoint uint8
}

type ZdoExtRemoveGroup

type ZdoExtRemoveGroup struct {
	Endpoint uint8
	GroupID  uint16
}

type ZdoExtRouteCheck

type ZdoExtRouteCheck struct {
	DestinationAddress string `hex:"2"`
	RTStatus           uint8
	Options            uint8
}

type ZdoExtRouteDisc

type ZdoExtRouteDisc struct {
	DestinationAddress string `hex:"2"`
	Options            uint8
	Radius             uint8
}

type ZdoExtRxIdle

type ZdoExtRxIdle struct {
	SetFlag  uint8
	SetValue uint8
}

type ZdoExtSeqApsRemoveReq

type ZdoExtSeqApsRemoveReq struct {
	NwkAddress      string `hex:"2"`
	ExtendedAddress string `hex:"8"`
	ParentAddress   string `hex:"2"`
}

type ZdoExtSetParams

type ZdoExtSetParams struct {
	UseMulticast uint8
}

type ZdoExtSwitchNwkKey

type ZdoExtSwitchNwkKey struct {
	DestinationAddress string `hex:"2"`
	KeySeqNum          uint8
}

type ZdoExtUpdateNwkKey

type ZdoExtUpdateNwkKey struct {
	DestinationAddress string `hex:"2"`
	KeySeqNum          uint8
	Key                [128]uint8
}

type ZdoGetLinkKey

type ZdoGetLinkKey struct {
	IEEEAddr string `hex:"8"`
}

type ZdoGetLinkKeyResponse

type ZdoGetLinkKeyResponse struct {
	Status      Status
	IEEEAddr    string `hex:"8"`
	LinkKeyData [16]uint8
}

type ZdoIEEEAddrRsp

type ZdoIEEEAddrRsp struct {
	Status       Status
	IEEEAddr     string `hex:"8"`
	NwkAddr      string `hex:"2"`
	StartIndex   uint8
	AssocDevList []string `size:"1" hex:"2"`
}

type ZdoIeeeAddrReq

type ZdoIeeeAddrReq struct {
	ShortAddr  string `hex:"2"`
	ReqType    ReqType
	StartIndex uint8
}

type ZdoJoinCnf

type ZdoJoinCnf struct {
	Status        Status
	DeviceAddress string `hex:"2"`
	ParentAddress string `hex:"2"`
}

type ZdoJoinReq

type ZdoJoinReq struct {
	LogicalChannel uint8
	PanID          uint16
	ExtendedPanID  uint64 //64-bit extended PAN ID (ver. 1.1 only). If not v1.1 or don't care, use all 0xFF
	ChosenParent   string `hex:"2"`
	ParentDepth    uint8
	StackProfile   uint8
}

type ZdoLeaveInd

type ZdoLeaveInd struct {
	SrcAddr string `hex:"2"`
	ExtAddr string `hex:"8"`
	Request uint8
	Remove  uint8
	Rejoin  uint8
}

type ZdoMatchDescReq

type ZdoMatchDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
	ProfileID         uint16
	InClusterList     []uint16 `size:"1"`
	OutClusterList    []uint16 `size:"1"`
}

type ZdoMatchDescRpsSent

type ZdoMatchDescRpsSent struct {
	NwkAddr        string   `hex:"2"`
	InClusterList  []uint16 `size:"1"`
	OutClusterList []uint16 `size:"1"`
}

type ZdoMatchDescRsp

type ZdoMatchDescRsp struct {
	SrcAddr   string `hex:"2"`
	Status    Status
	NWKAddr   string  `hex:"2"`
	MatchList []uint8 `size:"1"`
}

type ZdoMgmtBindReq

type ZdoMgmtBindReq struct {
	DstAddr    string `hex:"2"`
	StartIndex uint8
}

type ZdoMgmtBindRsp

type ZdoMgmtBindRsp struct {
	SrcAddr          string `hex:"2"`
	Status           Status
	BindTableEntries uint8
	StartIndex       uint8
	BindTable        []*Binding `size:"1"`
}

type ZdoMgmtDirectJoinReq

type ZdoMgmtDirectJoinReq struct {
	DstAddr    string `hex:"2"`
	DeviceAddr string `hex:"8"`
	CapInfo    *CapInfo
}

type ZdoMgmtDirectJoinRsp

type ZdoMgmtDirectJoinRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoMgmtLeaveReq

type ZdoMgmtLeaveReq struct {
	DstAddr              string `hex:"2"`
	DeviceAddr           string `hex:"8"`
	RemoveChildrenRejoin *RemoveChildrenRejoin
}

type ZdoMgmtLeaveRsp

type ZdoMgmtLeaveRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoMgmtLqiReq

type ZdoMgmtLqiReq struct {
	DstAddr    string `hex:"2"`
	StartIndex uint8
}

type ZdoMgmtLqiRsp

type ZdoMgmtLqiRsp struct {
	SrcAddr              string `hex:"2"`
	Status               Status
	NeighborTableEntries uint8
	StartIndex           uint8
	NeighborLqiList      []*NeighborLqi `size:"1"`
}

type ZdoMgmtNwkDiscRsp

type ZdoMgmtNwkDiscRsp struct {
	SrcAddr      string `hex:"2"`
	Status       Status
	NetworkCount uint8
	StartIndex   uint8
	NetworkList  []*Network `size:"1"`
}

type ZdoMgmtNwkDiskReq

type ZdoMgmtNwkDiskReq struct {
	DstAddr      string `hex:"2"`
	ScanChannels *Channels
	ScanDuration uint8
	StartIndex   uint8
}

type ZdoMgmtNwkUpdateReq

type ZdoMgmtNwkUpdateReq struct {
	DstAddr      string `hex:"2"`
	DstAddrMode  AddrMode
	ChannelMask  *Channels
	ScanDuration uint8
}

type ZdoMgmtPermitJoinReq

type ZdoMgmtPermitJoinReq struct {
	AddrMode       AddrMode
	DstAddr        string `hex:"2"`
	Duration       uint8
	TCSignificance uint8
}

type ZdoMgmtPermitJoinRsp

type ZdoMgmtPermitJoinRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoMgmtRtgReq

type ZdoMgmtRtgReq struct {
	DstAddr    string `hex:"2"`
	StartIndex uint8
}

type ZdoMgmtRtgRsp

type ZdoMgmtRtgRsp struct {
	SrcAddr             string `hex:"2"`
	Status              Status
	RoutingTableEntries uint8
	StartIndex          uint8
	RoutingTable        []*Route `size:"1"`
}

type ZdoMsgCbIncoming

type ZdoMsgCbIncoming struct {
	SrcAddr      string `hex:"2"`
	WasBroadcast uint8
	ClusterID    uint16
	SecurityUse  uint8
	SeqNum       uint8
	MacDstAddr   string `hex:"2"`
	Data         []uint8
}

type ZdoMsgCbRegister

type ZdoMsgCbRegister struct {
	ClusterID uint16
}

type ZdoMsgCbRemove

type ZdoMsgCbRemove struct {
	ClusterID uint16
}

type ZdoNodeDescReq

type ZdoNodeDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
}

type ZdoNodeDescRsp

type ZdoNodeDescRsp struct {
	SrcAddr                    string `hex:"2"`
	Status                     Status
	NWKAddrOfInterest          string      `hex:"2"`
	LogicalType                LogicalType `bits:"0b00000011" bitmask:"start"`
	ComplexDescriptorAvailable uint8       `bits:"0b00001000"`
	UserDescriptorAvailable    uint8       `bits:"0b00010000"  bitmask:"end"`
	APSFlags                   uint8       `bits:"0b00011111" bitmask:"start"`
	FrequencyBand              uint8       `bits:"0b11100000" bitmask:"end"`
	MacCapabilitiesFlags       *CapInfo
	ManufacturerCode           uint16
	MaxBufferSize              uint8
	MaxInTransferSize          uint16
	ServerMask                 *ServerMask
	MaxOutTransferSize         uint16
	DescriptorCapabilities     uint8
}

type ZdoNwkAddrOfInterestReq

type ZdoNwkAddrOfInterestReq struct {
	DestAddr          string `hex:"2"`
	NwkAddrOfInterest string `hex:"2"`
	Cmd               uint8
}

type ZdoNwkAddrReq

type ZdoNwkAddrReq struct {
	IEEEAddress string `hex:"8"`
	ReqType     ReqType
	StartIndex  uint8
}

type ZdoNwkAddrRsp

type ZdoNwkAddrRsp struct {
	Status       Status
	IEEEAddr     string `hex:"8"`
	NwkAddr      string `hex:"2"`
	StartIndex   uint8
	AssocDevList []string `size:"1" hex:"2"`
}

type ZdoNwkDiscoveryCnf

type ZdoNwkDiscoveryCnf struct {
	Status Status
}

type ZdoNwkDiscoveryReq

type ZdoNwkDiscoveryReq struct {
	ScanChannels *Channels
	ScanDuration uint8
}

type ZdoPermitJoinInd

type ZdoPermitJoinInd struct {
	PermitJoinDuration uint8
}

type ZdoPowerDescReq

type ZdoPowerDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
}

type ZdoPowerDescRsp

type ZdoPowerDescRsp struct {
	SrcAddr                 string `hex:"2"`
	Status                  Status
	NWKAddr                 string `hex:"2"`
	CurrentPowerMode        uint8  `bits:"0b00001111" bitmask:"start"`
	AvailablePowerSources   uint8  `bits:"0b11110000"  bitmask:"end"`
	CurrentPowerSource      uint8  `bits:"0b00001111" bitmask:"start"`
	CurrentPowerSourceLevel uint8  `bits:"0b11110000"  bitmask:"end"`
}

type ZdoRemoveLinkKey

type ZdoRemoveLinkKey struct {
	IEEEAddr string `hex:"8"`
}

type ZdoSecAddLinkKey

type ZdoSecAddLinkKey struct {
	ShortAddress    string `hex:"2"`
	ExtendedAddress string `hex:"8"`
	Key             [16]uint8
}

type ZdoSecDeviceRemove

type ZdoSecDeviceRemove struct {
	ExtendedAddress string `hex:"8"`
}

type ZdoSecEntryLookupExt

type ZdoSecEntryLookupExt struct {
	ExtendedAddress string `hex:"8"`
	Entry           [5]uint8
}

type ZdoSecEntryLookupExtResponse

type ZdoSecEntryLookupExtResponse struct {
	AMI                  uint16
	KeyNVID              uint16
	AuthenticationOption uint8
}

type ZdoServerDiscReq

type ZdoServerDiscReq struct {
	ServerMask *ServerMask
}

type ZdoServerDiscRsp

type ZdoServerDiscRsp struct {
	SrcAddr    string `hex:"2"`
	Status     Status
	ServerMask *ServerMask
}

type ZdoSetLinkKey

type ZdoSetLinkKey struct {
	ShortAddr   string `hex:"2"`
	IEEEAddr    string `hex:"8"`
	LinkKeyData [16]uint8
}

type ZdoSetRejoinParameters

type ZdoSetRejoinParameters struct {
	BackoffDuration uint32
	ScanDuration    uint32
}

type ZdoSimpleDescReq

type ZdoSimpleDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
	Endpoint          uint8
}

type ZdoSimpleDescRsp

type ZdoSimpleDescRsp struct {
	SrcAddr        string `hex:"2"`
	Status         Status
	NWKAddr        string `hex:"2"`
	Len            uint8
	Endpoint       uint8
	ProfileID      uint16
	DeviceID       uint16
	DeviceVersion  uint8
	InClusterList  []uint16 `size:"1"`
	OutClusterList []uint16 `size:"1"`
}

type ZdoSrcRtgInd

type ZdoSrcRtgInd struct {
	DstAddr   string   `hex:"2"`
	RelayList []string `size:"1" hex:"2"`
}

type ZdoStartupFromApp

type ZdoStartupFromApp struct {
	StartDelay uint16
}

type ZdoStartupFromAppResponse

type ZdoStartupFromAppResponse struct {
	Status StartupFromAppStatus
}

type ZdoStateChangeInd

type ZdoStateChangeInd struct {
	State DeviceState
}

type ZdoStatusErrorRsp

type ZdoStatusErrorRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoTcDevInd

type ZdoTcDevInd struct {
	SrcNwkAddr    string `hex:"2"`
	SrcIEEEAddr   string `hex:"8"`
	ParentNwkAddr string `hex:"2"`
}

type ZdoUnbindRsp

type ZdoUnbindRsp struct {
	SrcAddr string `hex:"2"`
	Status  Status
}

type ZdoUserDescConf

type ZdoUserDescConf struct {
	SrcAddr string `hex:"2"`
	Status  Status
	NWKAddr string `hex:"2"`
}

type ZdoUserDescReq

type ZdoUserDescReq struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
}

type ZdoUserDescRsp

type ZdoUserDescRsp struct {
	SrcAddr        string `hex:"2"`
	Status         Status
	NWKAddr        string `hex:"2"`
	UserDescriptor string `size:"1"`
}

type ZdoUserDescSet

type ZdoUserDescSet struct {
	DstAddr           string `hex:"2"`
	NWKAddrOfInterest string `hex:"2"`
	UserDescriptor    string `size:"1"`
}

type Znp

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

func New

func New(u *unp.Unp) *Znp

func (*Znp) AfApsfConfigSet

func (znp *Znp) AfApsfConfigSet(endpoint uint8, frameDelay uint8, windowSize uint8) (rsp *StatusResponse, err error)

func (*Znp) AfDataRequest

func (znp *Znp) AfDataRequest(dstAddr string, dstEndpoint uint8, srcEndpoint uint8, clusterId uint16,
	transId uint8, options *AfDataRequestOptions, radius uint8, data []uint8) (rsp *StatusResponse, err error)

func (*Znp) AfDataRequestExt

func (znp *Znp) AfDataRequestExt(dstAddrMode AddrMode, dstAddr string, dstEndpoint uint8, dstPanId uint16,
	srcEndpoint uint8, clusterId uint16, transId uint8, options *AfDataRequestOptions, radius uint8,
	data []uint8) (rsp *StatusResponse, err error)

func (*Znp) AfDataRequestSrcRtg

func (znp *Znp) AfDataRequestSrcRtg(dstAddr string, dstEndpoint uint8, srcEndpoint uint8, clusterId uint16,
	transId uint8, options *AfDataRequestSrcRtgOptions, radius uint8, relayList []string, data []uint8) (rsp *StatusResponse, err error)

func (*Znp) AfDataRetrieve

func (znp *Znp) AfDataRetrieve(timestamp uint32, index uint16, length uint8) (rsp *AfDataRetrieveResponse, err error)

func (*Znp) AfDataStore

func (znp *Znp) AfDataStore(index uint16, data []uint8) (rsp *StatusResponse, err error)

func (*Znp) AfInterPanCtl

func (znp *Znp) AfInterPanCtl(command InterPanCommand, data AfInterPanCtlData) (rsp *StatusResponse, err error)

func (*Znp) AfRegister

func (znp *Znp) AfRegister(endPoint uint8, appProfID uint16, appDeviceID uint16, addDevVer uint8,
	latencyReq Latency, appInClusterList []uint16, appOutClusterList []uint16) (rsp *StatusResponse, err error)

func (*Znp) AppCnfBdbAddInstallCode

func (znp *Znp) AppCnfBdbAddInstallCode(installCodeFormat InstallCodeFormat, ieeeAddr string, installCode []uint8) (rsp *StatusResponse, err error)

AppCnfBdbAddInstallCode add a preconfigured key (plain key or IC) to Trust Center device.

func (*Znp) AppCnfBdbSetActiveDefaultCentralizedKey

func (znp *Znp) AppCnfBdbSetActiveDefaultCentralizedKey(useGlobal uint8, installCode [18]uint8) (rsp *StatusResponse, err error)

AppCnfBdbSetActiveDefaultCentralizedKey on joining devices, set the default key or an install code to attempt to join the network.

func (*Znp) AppCnfBdbSetChannel

func (znp *Znp) AppCnfBdbSetChannel(isPrimary uint8, channel *Channels) (rsp *StatusResponse, err error)

AppCnfBdbSetChannel sets BDB primary or secondary channel masks.

func (*Znp) AppCnfBdbSetJoinUsesInstallCodeKey

func (znp *Znp) AppCnfBdbSetJoinUsesInstallCodeKey(bdbJoinUsesInstallCodeKey uint8) (rsp *StatusResponse, err error)

AppCnfBdbSetJoinUsesInstallCodeKey sets the policy to mandate or not the usage of an Install Code upon joining.

func (*Znp) AppCnfBdbSetTcRequireKeyExchange

func (znp *Znp) AppCnfBdbSetTcRequireKeyExchange(bdbTrustCenterRequireKeyExchange uint8) (rsp *StatusResponse, err error)

AppCnfBdbSetTcRequireKeyExchange sets the policy flag on Trust Center device to mandate or not the TCLK exchange procedure.

func (*Znp) AppCnfBdbStartCommissioning

func (znp *Znp) AppCnfBdbStartCommissioning(commissioningMode CommissioningMode) (rsp *StatusResponse, err error)

AppCnfBdbStartCommissioning set the commissioning methods to be executed. Initialization of BDB is executed with this call, regardless of its parameters.

func (*Znp) AppCnfBdbZedAttemptRecoverNwk

func (znp *Znp) AppCnfBdbZedAttemptRecoverNwk(useGlobal uint8, installCode [18]uint8) (rsp *StatusResponse, err error)

AppCnfBdbZedAttemptRecoverNwk instruct the ZED to try to rejoin its previews network. Use only in ZED devices.

func (*Znp) AppCnfSetAllowRejoinTcPolicy

func (znp *Znp) AppCnfSetAllowRejoinTcPolicy(allowRejoin uint8) (rsp *StatusResponse, err error)

AppCnfSetAllowRejoinTcPolicy sets the AllowRejoin TC policy.

func (*Znp) AppCnfSetDefaultEndDeviceTimeout

func (znp *Znp) AppCnfSetDefaultEndDeviceTimeout(timeout Timeout) (rsp *StatusResponse, err error)

AppCnfSetDefaultEndDeviceTimeout sets the default value used by parent device to expire legacy child devices.

func (*Znp) AppCnfSetEndDeviceTimeout

func (znp *Znp) AppCnfSetEndDeviceTimeout(timeout Timeout) (rsp *StatusResponse, err error)

AppCnfSetEndDeviceTimeout sets in ZED the timeout value to be send to parent device for child expiring.

func (*Znp) AppCnfSetNwkFrameCounter

func (znp *Znp) AppCnfSetNwkFrameCounter(frameCounterValue uint8) (rsp *StatusResponse, err error)

AppCnfSetNwkFrameCounter sets the network frame counter to the value specified in the Frame Counter Value. For projects with multiple instances of frame counter, the message sets the frame counter of the current network.

func (*Znp) AppMsg

func (znp *Znp) AppMsg(appEndpoint uint8, dstAddr string, dstEndpoint uint8, clusterID uint16,
	message []uint8) (rsp *StatusResponse, err error)

func (*Znp) AppUserTest

func (znp *Znp) AppUserTest(srcEndpoint uint8, commandId uint16, parameter1 uint16, parameter2 uint16) (rsp *StatusResponse, err error)

func (*Znp) AsyncInbound

func (znp *Znp) AsyncInbound() chan interface{}

func (*Znp) DebugMsg

func (znp *Znp) DebugMsg(str string) error

func (*Znp) DebugSetThreshold

func (znp *Znp) DebugSetThreshold(componentId uint8, threshold uint8) (rsp *StatusResponse, err error)

func (*Znp) Errors

func (znp *Znp) Errors() chan error

func (*Znp) GpDataReq

func (znp *Znp) GpDataReq(action GpAction, txOptions *TxOptions, applicationId uint8, srcId uint32,
	gpdIEEEAddress string, endpoint uint8, gpdCommandId uint8, gpdasdu []uint8,
	gpepHandle uint8, gpTxQueueEntryLifetime uint32) (rsp *StatusResponse, err error)

GpDataReq callback to receive notifications from BDB process.

func (*Znp) GpSecRsp

func (znp *Znp) GpSecRsp(status GpStatus, dGPStubHandle uint8, applicationID uint8, srcID uint32,
	gpdIEEEAddress string, endpoint uint8, gpdFSecurityLevel uint8, gpdFKeyType uint8,
	gpdKey [16]uint8, gpdSecurityFrameCounter uint32) (rsp *StatusResponse, err error)

GpSecRsp provides a mechanism for the Green Power EndPoint to provide security data into the dGP stub.

func (*Znp) InFramesLog

func (znp *Znp) InFramesLog() chan *unp.Frame

func (*Znp) IsStarted

func (znp *Znp) IsStarted() bool

func (*Znp) OutFramesLog

func (znp *Znp) OutFramesLog() chan *unp.Frame

func (*Znp) ProcessRequest

func (znp *Znp) ProcessRequest(commandType unp.CommandType, subsystem unp.Subsystem, command byte, req interface{}, resp interface{}) error

func (*Znp) SapiZbAllowBind

func (znp *Znp) SapiZbAllowBind(timeout uint8) (rsp *EmptyResponse, err error)

func (*Znp) SapiZbBindDevice

func (znp *Znp) SapiZbBindDevice(create uint8, commandId uint16, destination string) (rsp *EmptyResponse, err error)

func (*Znp) SapiZbFindDeviceRequest

func (znp *Znp) SapiZbFindDeviceRequest(searchKey string) (rsp *EmptyResponse, err error)

func (*Znp) SapiZbGetDeviceInfo

func (znp *Znp) SapiZbGetDeviceInfo(param uint8) (rsp *SapiZbGetDeviceInfoResponse, err error)

func (*Znp) SapiZbPermitJoiningRequest

func (znp *Znp) SapiZbPermitJoiningRequest(destination string, timeout uint8) (rsp *StatusResponse, err error)

func (*Znp) SapiZbReadConfiguration

func (znp *Znp) SapiZbReadConfiguration(configID uint8) (rsp *SapiZbReadConfigurationResponse, err error)

func (*Znp) SapiZbSendDataRequest

func (znp *Znp) SapiZbSendDataRequest(destination string, commandID uint16, handle uint8,
	ack uint8, radius uint8, data []uint8) (rsp *EmptyResponse, err error)

func (*Znp) SapiZbStartRequest

func (znp *Znp) SapiZbStartRequest() (rsp *EmptyResponse, err error)

func (*Znp) SapiZbSystemReset

func (znp *Znp) SapiZbSystemReset() error

func (*Znp) SapiZbWriteConfiguration

func (znp *Znp) SapiZbWriteConfiguration(configID uint8, value []uint8) (rsp *StatusResponse, err error)

func (*Znp) Start

func (znp *Znp) Start()

func (*Znp) Stop

func (znp *Znp) Stop()

func (*Znp) SysAdcRead

func (znp *Znp) SysAdcRead(channel Channel, resolution Resolution) (rsp *SysAdcReadResponse, err error)

SysAdcRead reads a value from the ADC based on specified channel and resolution.

func (*Znp) SysGetExtAddr

func (znp *Znp) SysGetExtAddr() (rsp *SysGetExtAddrResponse, err error)

SysGetExtAddr is used to get the extended address of the device

func (*Znp) SysGetTime

func (znp *Znp) SysGetTime() (rsp *SysTime, err error)

SysGetTime is used by the tester to get the target system date and time. The time is returned in seconds since 00:00:00 on January 1, 2000” and parsed date/time components.

func (*Znp) SysGpio

func (znp *Znp) SysGpio(operation Operation, value uint8) (rsp *SysGpioResponse, err error)

SysGpio is used by the tester to control the 4 GPIO pins on the CC2530-ZNP build.

func (*Znp) SysNvCompact

func (znp *Znp) SysNvCompact(threshold uint16) (rsp *StatusResponse, err error)

SysNvCompact is used to compact the active page in non-volatile memory

func (*Znp) SysNvCreate

func (znp *Znp) SysNvCreate(sysID uint8, itemID uint16, subID uint16, length uint32) (rsp *StatusResponse, err error)

SysNvCreate is used to attempt to create an item in non-volatile memory.

func (*Znp) SysNvDelete

func (znp *Znp) SysNvDelete(sysID uint8, itemID uint16, subID uint16) (rsp *StatusResponse, err error)

SysNvDelete is used to attempt to delete an item in non-volatile memory.

func (*Znp) SysNvLength

func (znp *Znp) SysNvLength(sysID uint8, itemID uint16, subID uint16) (rsp *SysNvLengthResponse, err error)

SysNvLength is used to get the length of an item in non-volatile memory.

func (*Znp) SysNvRead

func (znp *Znp) SysNvRead(sysID uint8, itemID uint16, subID uint16, offset uint16, length uint8) (rsp *SysNvReadResponse, err error)

SysNvRead is used to read an item in non-volatile memory

func (*Znp) SysNvReadExt

func (znp *Znp) SysNvReadExt(id uint16, offset uint16) (rsp *SysNvReadResponse, err error)

SysNvReadExt is used by the tester to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value and data offset and returns the memory value present in the target for the specified attribute Id.

func (*Znp) SysNvUpdate

func (znp *Znp) SysNvUpdate(sysID uint8, itemID uint16, subID uint16, value []uint8) (rsp *StatusResponse, err error)

SysNvUpdate is used to update an item in non-volatile memory

func (*Znp) SysNvWrite

func (znp *Znp) SysNvWrite(sysID uint8, itemID uint16, subID uint16, offset uint16, value []uint8) (rsp *StatusResponse, err error)

SysNvWrite is used to write an item in non-volatile memory

func (*Znp) SysNvWriteExt

func (znp *Znp) SysNvWriteExt(id uint16, offset uint16, value []uint8) (rsp *StatusResponse, err error)

SysNvWrite is used to write an item in non-volatile memory

func (*Znp) SysOsalNvDelete

func (znp *Znp) SysOsalNvDelete(id uint16, itemLen uint16) (rsp *StatusResponse, err error)

SysOsalNvDelete is used by the tester to delete an item from the non-volatile memory. The ItemLen parameter must match the length of the NV item or the command will fail. Use this command with caution – deleted items cannot be recovered.

func (*Znp) SysOsalNvItemInit

func (znp *Znp) SysOsalNvItemInit(id uint16, itemLen uint16, initData []uint8) (rsp *StatusResponse, err error)

SysOsalNvItemInit is used by the tester to create and initialize an item in non-volatile memory. The NV item will be created if it does not already exist. The data for the new NV item will be left uninitialized if the InitLen parameter is zero. When InitLen is non-zero, the data for the NV item will be initialized (starting at offset of zero) with the values from InitData. Note that it is not necessary to initialize the entire NV item (InitLen < ItemLen). It is also possible to create an NV item that is larger than the maximum length InitData – use the SYS_OSAL_NV_WRITE command to finish the initialization.

func (*Znp) SysOsalNvLength

func (znp *Znp) SysOsalNvLength(id uint16) (rsp *SysOsalNvLengthResponse, err error)

SysOsalNvLength is used by the tester to get the length of an item in non-volatile memory. A returned length of zero indicates that the NV item does not exist.

func (*Znp) SysOsalNvRead

func (znp *Znp) SysOsalNvRead(id uint16, offset uint8) (rsp *StatusResponse, err error)

SysOsalNvRead is used by the tester to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value and data offset and returns the memory value present in the target for the specified attribute Id.

func (*Znp) SysOsalNvWrite

func (znp *Znp) SysOsalNvWrite(id uint16, offset uint8, value []uint8) (rsp *StatusResponse, err error)

SysOsalNvWrite is used by the tester to write to a particular item in non-volatile memory. The command accepts an attribute Id, data offset, data length, and attribute value. The attribute value is written to the location specified for the attribute Id in the target.

func (*Znp) SysOsalStartTimer

func (znp *Znp) SysOsalStartTimer(id uint8, timeout uint16) (rsp *StatusResponse, err error)

SysOsalStartTimer is used by the tester to start a timer event. The event will expired after the indicated amount of time and a notification will be sent back to the tester.

func (*Znp) SysOsalStopTimer

func (znp *Znp) SysOsalStopTimer(id uint8) (rsp *StatusResponse, err error)

SysOsalStopTimer is used by the tester to stop a timer event.

func (*Znp) SysPing

func (znp *Znp) SysPing() (rsp *SysPingResponse, err error)

SysPing issues PING requests to verify if a device is active and check the capability of the device.

func (*Znp) SysRamRead

func (znp *Znp) SysRamRead(address uint16, len uint8) (rsp *SysRamReadResponse, err error)

SysRamRead is used by the tester to read a single memory location in the target RAM. The command accepts an address value and returns the memory value present in the target RAM at that address.

func (*Znp) SysRamWrite

func (znp *Znp) SysRamWrite(address uint16, value []uint8) (rsp *StatusResponse, err error)

SysRamWrite is used by the tester to write to a particular location in the target RAM. The command accepts an address location and a memory value. The memory value is written to the address location in the target RAM.

func (*Znp) SysRandom

func (znp *Znp) SysRandom() (rsp *SysRandomResponse, err error)

SysRandom is used by the tester to get a random 16-bit number.

func (*Znp) SysResetReq

func (znp *Znp) SysResetReq(resetType byte) error

SysReset is sent by the tester to reset the target device

func (*Znp) SysSetExtAddr

func (znp *Znp) SysSetExtAddr(extAddr string) (rsp *StatusResponse, err error)

SysSetExtAddr is used to set the extended address of the device

func (*Znp) SysSetTime

func (znp *Znp) SysSetTime(utcTime uint32, hour uint8, minute uint8, second uint8,
	month uint8, day uint8, year uint16) (rsp *StatusResponse, err error)

SysSetTime is used by the tester to set the target system date and time. The time can be specified in “seconds since 00:00:00 on January 1, 2000” or in parsed date/time components

func (*Znp) SysSetTxPower

func (znp *Znp) SysSetTxPower(txPower uint8) (rsp *SysSetTxPowerResponse, err error)

SysSetTxPower is used by the tester to set the target system radio transmit power. The returned TX power is the actual setting applied to the radio – nearest characterized value for the specific radio

func (*Znp) SysVersion

func (znp *Znp) SysVersion() (rsp *SysVersionResponse, err error)

func (*Znp) SysZDiagsClearStats

func (znp *Znp) SysZDiagsClearStats(clearNV uint8) (rsp *SysZDiagsClearStatsResponse, err error)

SysZDiagsClearStats is used to clear the statistics table. To clear data in NV (including the Boot Counter) the clearNV flag shall be set to TRUE.

func (*Znp) SysZDiagsGetStats

func (znp *Znp) SysZDiagsGetStats(attributeID uint16) (rsp *SysZDiagsGetStatsResponse, err error)

SysZDiagsGetStats is used to read a specific system (attribute) ID statistics and/or metrics value.

func (*Znp) SysZDiagsInitStats

func (znp *Znp) SysZDiagsInitStats() (rsp *StatusResponse, err error)

SysZDiagsInitStats is used to initialize the statistics table in NV memory.

func (*Znp) SysZDiagsRestoreStatsNv

func (znp *Znp) SysZDiagsRestoreStatsNv() (rsp *StatusResponse, err error)

SysZDiagsRestoreStatsNv is used to restore the statistics table from NV into the RAM table.

func (*Znp) SysZDiagsSaveStatsToNv

func (znp *Znp) SysZDiagsSaveStatsToNv() (rsp *SysZDiagsSaveStatsToNvResponse, err error)

SysZDiagsSaveStatsToNv is used to save the statistics table from RAM to NV.

func (*Znp) UtilAddrMgrAddrLookup

func (znp *Znp) UtilAddrMgrAddrLookup(nwkAddr string) (rsp *UtilAddrMgrAddrLookupResponse, err error)

UtilAddrMgrAddrLookup is a proxy call to the AddrMgrEntryLookupNwk() function.

func (*Znp) UtilAddrMgrExtAddrLookup

func (znp *Znp) UtilAddrMgrExtAddrLookup(extAddr string) (rsp *UtilAddrMgrExtAddrLookupResponse, err error)

UtilAddrMgrExtAddrLookup is a proxy call to the AddrMgrEntryLookupExt() function.

func (*Znp) UtilApsmeLinkKeyDataGet

func (znp *Znp) UtilApsmeLinkKeyDataGet(extAddr string) (rsp *UtilApsmeLinkKeyDataGetResponse, err error)

UtilApsmeLinkKeyDataGet retrieves APS link key data, Tx and Rx frame counters

func (*Znp) UtilApsmeLinkKeyNvIdGet

func (znp *Znp) UtilApsmeLinkKeyNvIdGet(extAddr string) (rsp *UtilApsmeLinkKeyNvIdGetResponse, err error)

UtilApsmeLinkKeyNvIdGet is a proxy call to the APSME_LinkKeyNvIdGet() function.

func (*Znp) UtilApsmeRequestKeyCmd

func (znp *Znp) UtilApsmeRequestKeyCmd(partnerAddr string) (rsp *StatusResponse, err error)

UtilApsmeRequestKeyCmd is used to send a request key to the Trust Center from an originator device who wants to exchange messages with a partner device.

func (*Znp) UtilAssocCount

func (znp *Znp) UtilAssocCount(startRelation Relation, endRelation Relation) (rsp *UtilAssocCountResponse, err error)

UtilAssocCount is a proxy call to the AssocCount() function

func (*Znp) UtilAssocFindDevice

func (znp *Znp) UtilAssocFindDevice(number uint8) (rsp *UtilAssocFindDeviceResponse, err error)

UtilAssocFindDevice is a proxy call to the AssocFindDevice() function.

func (*Znp) UtilAssocGetWithAddr

func (znp *Znp) UtilAssocGetWithAddr(extAddr string, nwkAddr string) (rsp *UtilAssocGetWithAddrResponse, err error)

UtilAssocGetWithAddr is a proxy call to the AssocGetWithAddress() function.

func (*Znp) UtilBindAddEntry

func (znp *Znp) UtilBindAddEntry(addrMode AddrMode, dstAddr string, dstEndpoint uint8, clusterIds []uint16) (rsp *UtilBindAddEntryResponse, err error)

UtilBindAddEntry is a proxy call to the bindAddEntry() function

func (*Znp) UtilCallbackSubCmd

func (znp *Znp) UtilCallbackSubCmd(subsystemID SubsystemId, action Action) (rsp *StatusResponse, err error)

UtilCallbackSubCmd subscribes/unsubscribes to layer callbacks. For particular subsystem callbacks to work, the software must be compiled with a special flag that is unique to that subsystem to enable the callback mechanism. For example to enable ZDO callbacks, MT_ZDO_CB_FUNC flag must be compiled when the software is built. For complete list of callback compile flags, check section 1.2 or “Z-Stack Compile Options” document.

func (*Znp) UtilDataReq

func (znp *Znp) UtilDataReq(securityUse uint8) (rsp *StatusResponse, err error)

UtilDataReq is used by the tester to effect a MAC MLME Poll Request

func (*Znp) UtilGetDeviceInfo

func (znp *Znp) UtilGetDeviceInfo() (rsp *UtilGetDeviceInfoResponse, err error)

UtilGetDeviceInfo is sent by the tester to retrieve the device info.

func (*Znp) UtilGetNvInfo

func (znp *Znp) UtilGetNvInfo() (rsp *UtilGetNvInfoResponse, err error)

UtilGetNvInfo is used by the tester to read a block of parameters from non-volatile storage of the target device.

func (*Znp) UtilKeyEvent

func (znp *Znp) UtilKeyEvent(keys *Keys, shift Shift) (rsp *StatusResponse, err error)

UtilKeyEvent sends key and shift codes to the application that registered for key events. The keys parameter is a bit mask, allowing for multiple keys in a single command. The return status indicates success if the command is processed by a registered key handler, not whether the key code was used. Not all applications support all key or shift codes but there is no indication when a key code is dropped.

func (*Znp) UtilLedControl

func (znp *Znp) UtilLedControl(ledID uint8, mode Mode) (rsp *StatusResponse, err error)

UtilLedControl is used by the tester to control the LEDs on the board.

func (*Znp) UtilLoopback

func (znp *Znp) UtilLoopback(data []uint8) (rsp *UtilLoopback, err error)

UtilLoopback is used by the tester to test data buffer loopback.

func (*Znp) UtilSetChannels

func (znp *Znp) UtilSetChannels(channels *Channels) (rsp *StatusResponse, err error)

UtilSetChannels is used to store a channel select bit-mask into non-volatile memory to be used the next time the target device resets.

func (*Znp) UtilSetPanId

func (znp *Znp) UtilSetPanId(panId uint16) (rsp *StatusResponse, err error)

UtilSetPanId stores a PanId value into non-volatile memory to be used the next time the target device resets.

func (*Znp) UtilSetPreCfgKey

func (znp *Znp) UtilSetPreCfgKey(preCfgKey [16]uint8) (rsp *StatusResponse, err error)

UtilSetPreCfgKey is used to store a pre-configured key array into non-volatile memory to be used the next time the target device resets.

func (*Znp) UtilSetSecLevel

func (znp *Znp) UtilSetSecLevel(secLevel uint8) (rsp *StatusResponse, err error)

UtilSetSecLevel is used to store a security level value into non-volatile memory to be used the next time the target device resets.

func (*Znp) UtilSrcMatchAckAllPending

func (znp *Znp) UtilSrcMatchAckAllPending(option Action) (rsp *StatusResponse, err error)

UtilSrcMatchAckAllPending is used to enable/disable acknowledging all packets with pending bit set.

func (*Znp) UtilSrcMatchAddEntry

func (znp *Znp) UtilSrcMatchAddEntry(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error)

UtilSrcMatchAddEntry is used to add a short or extended address to the source address table

func (*Znp) UtilSrcMatchCheckAllPending

func (znp *Znp) UtilSrcMatchCheckAllPending() (rsp *UtilSrcMatchCheckAllPendingResponse, err error)

UtilSrcMatchCheckAllPending is used to check if acknowledging all packets with pending bit set is enabled.

func (*Znp) UtilSrcMatchCheckSrcAddr

func (znp *Znp) UtilSrcMatchCheckSrcAddr(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error)

UtilSrcMatchCheckSrcAddr is used to delete a short or extended address from the source address table.

func (*Znp) UtilSrcMatchDelEntry

func (znp *Znp) UtilSrcMatchDelEntry(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error)

UtilSrcMatchDelEntry is used to delete a short or extended address from the source address table.

func (*Znp) UtilSrcMatchEnable

func (znp *Znp) UtilSrcMatchEnable() (rsp *StatusResponse, err error)

UtilSrcMatchEnable is used to enable AUTOPEND and source address matching.

func (*Znp) UtilSrngGen

func (znp *Znp) UtilSrngGen() (rsp *UtilSrngGenResponse, err error)

UtilSrngGen is used to generate Secure Random Number. It generates 1,000,000 bits in sets of 100 bytes. As in 100 bytes of secure random numbers are generated until 1,000,000 bits are generated. 100 bytes are generate

func (*Znp) UtilSyncReq

func (znp *Znp) UtilSyncReq() (err error)

UtilSyncReq is an asynchronous request/response handshake.

func (*Znp) UtilTimeAlive

func (znp *Znp) UtilTimeAlive() (rsp *UtilTimeAliveResponse, err error)

UtilTimeAlive is used by the tester to get the board’s time alive

func (*Znp) UtilZclKeyEstInitEst

func (znp *Znp) UtilZclKeyEstInitEst(taskId uint8, seqNum uint8, endPoint uint8, addrMode AddrMode, addr string) (rsp *StatusResponse, err error)

UtilZclKeyEstInitEst is a proxy call to zclGeneral_KeyEstablish_InitiateKeyEstablishment().

func (*Znp) UtilZclKeyEstSign

func (znp *Znp) UtilZclKeyEstSign(input []uint8) (rsp *UtilZclKeyEstSignResponse, err error)

UtilZclKeyEstSign is a proxy call to zclGeneral_KeyEstablishment_ECDSASign().

func (*Znp) ZdoActiveEpReq

func (znp *Znp) ZdoActiveEpReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error)

ZdoActiveEpReq is generated to request a list of active endpoint from the destination device

func (*Znp) ZdoBindReq

func (znp *Znp) ZdoBindReq(dstAddr string, srcAddress string, srcEndpoint uint8, clusterId uint16,
	dstAddrMode AddrMode, dstAddress string, dstEndpoint uint8) (rsp *StatusResponse, err error)

ZdoBindReq is generated to request an End Device Bind with the destination device.

func (*Znp) ZdoComplexDescReq

func (znp *Znp) ZdoComplexDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error)

ZdoComplexDescReq is generated to request for the destination device’s complex descriptor.

func (*Znp) ZdoEndDeviceAnnce

func (znp *Znp) ZdoEndDeviceAnnce(nwkAddr string, ieeeAddr string, capabilities *CapInfo) (rsp *StatusResponse, err error)

ZdoEndDeviceAnnce will cause the device to issue an “End device announce” broadcast packet to the network. This is typically used by an end-device to announce itself to the network.

func (*Znp) ZdoEndDeviceBindReq

func (znp *Znp) ZdoEndDeviceBindReq(dstAddr string, localCoordinatorAddr string, ieeeAddr string, endpoint uint8,
	profileId uint16, inClusterList []uint16, outClusterList []uint16) (rsp *StatusResponse, err error)

ZdoEndDeviceBindReq is generated to request an End Device Bind with the destination device.

func (*Znp) ZdoExtAddGroup

func (znp *Znp) ZdoExtAddGroup(endpoint uint8, groupID uint16, groupName string) (rsp *StatusResponse, err error)

ZdoExtAddGroup handles the ZDO extension add group message.

func (*Znp) ZdoExtCountAllGroups

func (znp *Znp) ZdoExtCountAllGroups() (rsp *ZdoExtCountAllGroupsResponse, err error)

ZdoExtCountAllGroups handles the ZDO extension count all groups message.

func (*Znp) ZdoExtFindAllGroupsEndpoint

func (znp *Znp) ZdoExtFindAllGroupsEndpoint(endpoint uint8, groupList []uint16) (rsp *ZdoExtFindAllGroupsEndpointResponse, err error)

ZdoExtFindAllGroupsEndpoint handles the ZDO extension find all groups for endpoint message

func (*Znp) ZdoExtFindGroup

func (znp *Znp) ZdoExtFindGroup(endpoint uint8, groupID uint16) (rsp *ZdoExtFindGroupResponse, err error)

ZdoExtFindGroup handles the ZDO extension find all groups for endpoint message

func (*Znp) ZdoExtNwkInfo

func (znp *Znp) ZdoExtNwkInfo() (rsp *ZdoExtNwkInfoResponse, err error)

ZdoExtNwkInfo handles the ZDO extension network message.

func (*Znp) ZdoExtRemoveAllGroup

func (znp *Znp) ZdoExtRemoveAllGroup(endpoint uint8) (rsp *StatusResponse, err error)

ZdoExtRemoveAllGroup handles the ZDO extended remove all group extension message.

func (*Znp) ZdoExtRemoveGroup

func (znp *Znp) ZdoExtRemoveGroup(endpoint uint8, groupId uint16) (rsp *StatusResponse, err error)

ZdoExtRemoveGroup handles the ZDO extended remove group extension message.

func (*Znp) ZdoExtRouteCheck

func (znp *Znp) ZdoExtRouteCheck(destinationAddress string, rtStatus uint8, options uint8) (rsp *StatusResponse, err error)

ZdoExtRouteCheck handles the ZDO route check extension message.

func (*Znp) ZdoExtRouteDisc

func (znp *Znp) ZdoExtRouteDisc(destinationAddress string, options uint8, radius uint8) (rsp *StatusResponse, err error)

ZdoExtRouteDisc handles the ZDO route discovery extension message.

func (*Znp) ZdoExtRxIdle

func (znp *Znp) ZdoExtRxIdle(setFlag uint8, setValue uint8) (rsp *StatusResponse, err error)

ZdoExtRxIdle handles the ZDO extension Get/Set RxOnIdle to ZMac message

func (*Znp) ZdoExtSeqApsRemoveReq

func (znp *Znp) ZdoExtSeqApsRemoveReq(nwkAddress string, extendedAddress string, parentAddress string) (rsp *StatusResponse, err error)

ZdoExtSeqApsRemoveReq handles the ZDO extension Security Manager APS Remove Request message.

func (*Znp) ZdoExtSetParams

func (znp *Znp) ZdoExtSetParams(useMulticast uint8) (rsp *StatusResponse, err error)

ZdoExtSeqApsRemoveReq set parameters not settable through NV.

func (*Znp) ZdoExtSwitchNwkKey

func (znp *Znp) ZdoExtSwitchNwkKey(destinationAddress string, keySeqNum uint8) (rsp *StatusResponse, err error)

ZdoExtSwitchNwkKey handles the ZDO security switch network key extension message.

func (*Znp) ZdoExtUpdateNwkKey

func (znp *Znp) ZdoExtUpdateNwkKey(destinationAddress string, keySeqNum uint8, key [128]uint8) (rsp *StatusResponse, err error)

ZdoExtUpdateNwkKey handles the ZDO security update network key extension message.

func (*Znp) ZdoForceConcentratorChange

func (znp *Znp) ZdoForceConcentratorChange() error

ZdoForceConcentratorChange forces a network concentrator change by resetting zgConcentratorEnable and zgConcentratorDiscoveryTime from NV and set nwk event.

func (*Znp) ZdoGetLinkKey

func (znp *Znp) ZdoGetLinkKey(ieeeAddr string) (rsp *ZdoGetLinkKeyResponse, err error)

ZdoGetLinkKey retrieves the application link key of a given device.

func (*Znp) ZdoIeeeAddrReq

func (znp *Znp) ZdoIeeeAddrReq(shortAddr string, reqType ReqType, startIndex uint8) (rsp *StatusResponse, err error)

ZdoIeeeAddrReq will request a device’s IEEE 64-bit address. You must subscribe to “ZDO IEEE Address Response” to receive the data response to this message. The response message listed below only indicates whether or not the message was received properly.

func (*Znp) ZdoJoinReq

func (znp *Znp) ZdoJoinReq(logicalChannel uint8, panId uint16, extendedPanId uint64,
	chosenParent string, parentDepth uint8, stackProfile uint8) (rsp *StatusResponse, err error)

ZdoJoinReq is used to request the device to join itself to a parent device on a network.

func (*Znp) ZdoMatchDescReq

func (znp *Znp) ZdoMatchDescReq(dstAddr string, nwkAddrOfInterest string, profileId uint16,
	inClusterList []uint16, outClusterList []uint16) (rsp *StatusResponse, err error)

ZdoMatchDescReq is generated to request the device match descriptor

func (*Znp) ZdoMgmtBindReq

func (znp *Znp) ZdoMgmtBindReq(dstAddr string, startIndex uint8) (rsp *StatusResponse, err error)

ZdoMgmtBindReq is generated to request the Binding Table of the destination device.

func (*Znp) ZdoMgmtDirectJoinReq

func (znp *Znp) ZdoMgmtDirectJoinReq(dstAddr string, deviceAddr string, capInfo *CapInfo) (rsp *StatusResponse, err error)

ZdoMgmtDirectJoinReq is generated to request the Management Direct Join Request of a designated device.

func (*Znp) ZdoMgmtLeaveReq

func (znp *Znp) ZdoMgmtLeaveReq(dstAddr string, deviceAddr string, removeChildrenRejoin *RemoveChildrenRejoin) (rsp *StatusResponse, err error)

ZdoMgmtLeaveReq is generated to request a Management Leave Request for the target device

func (*Znp) ZdoMgmtLqiReq

func (znp *Znp) ZdoMgmtLqiReq(dstAddr string, startIndex uint8) (rsp *StatusResponse, err error)

ZdoMgmtLqiReq is generated to request the destination device to perform a LQI query of other devices in the network.

func (*Znp) ZdoMgmtNwkDiskReq

func (znp *Znp) ZdoMgmtNwkDiskReq(dstAddr string, scanChannels *Channels, scanDuration uint8, startIndex uint8) (rsp *StatusResponse, err error)

ZdoMgmtNwkDiskReq is generated to request the destination device to perform a network discovery

func (*Znp) ZdoMgmtNwkUpdateReq

func (znp *Znp) ZdoMgmtNwkUpdateReq(dstAddr string, dstAddrMode AddrMode, channelMask *Channels, scanDuration uint8) (rsp *StatusResponse, err error)

ZdoMgmtNwkUpdateReq is provided to allow updating of network configuration parameters or to request information from devices on network conditions in the local operating environment.

func (*Znp) ZdoMgmtPermitJoinReq

func (znp *Znp) ZdoMgmtPermitJoinReq(addrMode AddrMode, dstAddr string, duration uint8, tcSignificance uint8) (rsp *StatusResponse, err error)

ZdoMgmtPermitJoinReq is generated to set the Permit Join for the destination device.

func (*Znp) ZdoMgmtRtgReq

func (znp *Znp) ZdoMgmtRtgReq(dstAddr string, startIndex uint8) (rsp *StatusResponse, err error)

ZdoMgmtRtgReq is generated to request the Routing Table of the destination device

func (*Znp) ZdoMsgCbRegister

func (znp *Znp) ZdoMsgCbRegister(clusterId uint16) (rsp *StatusResponse, err error)

ZdoMsgCbRegister registers for a ZDO callback (see reference [3], “6. ZDO Message Requests” for example usage).

func (*Znp) ZdoMsgCbRemove

func (znp *Znp) ZdoMsgCbRemove(clusterId uint16) (rsp *StatusResponse, err error)

ZdoMsgCbRemove removes a registration for a ZDO callback (see reference [3], “6. ZDO Message Requests” for example usage).

func (*Znp) ZdoNodeDescReq

func (znp *Znp) ZdoNodeDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error)

ZdoNodeDescReq is generated to inquire about the Node Descriptor information of the destination device.

func (*Znp) ZdoNwkAddrOfInterestReq

func (znp *Znp) ZdoNwkAddrOfInterestReq(destAddr string, nwkAddrOfInterest string, cmd uint8) (rsp *StatusResponse, err error)

ZdoNwkAddrOfInterestReq handles ZDO network address of interest request.

func (*Znp) ZdoNwkAddrReq

func (znp *Znp) ZdoNwkAddrReq(ieeeAddress string, reqType ReqType, startIndex uint8) (rsp *StatusResponse, err error)

ZdoNwkAddrReq will request the device to send a “Network Address Request”. This message sends a broadcast message looking for a 16 bit address with a known 64 bit IEEE address. You must subscribe to “ZDO Network Address Response” to receive the response to this message. Check section 3.0.1.7 for more details on callback subscription. The response message listed below only indicates whether or not the message was received properly.

func (*Znp) ZdoNwkDiscoveryReq

func (znp *Znp) ZdoNwkDiscoveryReq(scanChannels *Channels, scanDuration uint8) (rsp *StatusResponse, err error)

ZdoNwkDiscoveryReq is used to initiate a network discovery (active scan). Strange response SecOldFrmCount(0xa1)

func (*Znp) ZdoPowerDescReq

func (znp *Znp) ZdoPowerDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error)

ZdoPowerDescReq is generated to inquire about the Power Descriptor information of the destination device.

func (*Znp) ZdoRemoveLinkKey

func (znp *Znp) ZdoRemoveLinkKey(ieeeAddr string) (rsp *StatusResponse, err error)

ZdoRemoveLinkKey removes the application link key of a given device.

func (*Znp) ZdoSecAddLinkKey

func (znp *Znp) ZdoSecAddLinkKey(shortAddress string, extendedAddress string, key [16]uint8) (rsp *StatusResponse, err error)

ZdoSecAddLinkKey handles the ZDO security add link key extension message.

func (*Znp) ZdoSecDeviceRemove

func (znp *Znp) ZdoSecDeviceRemove(extendedAddress string) (rsp *StatusResponse, err error)

ZdoSecDeviceRemove handles the ZDO security remove device extended extension message.

func (*Znp) ZdoSecEntryLookupExt

func (znp *Znp) ZdoSecEntryLookupExt(extendedAddress string, entry [5]uint8) (rsp *ZdoSecEntryLookupExtResponse, err error)

ZdoSecEntryLookupExt handles the ZDO security entry lookup extended extension message

func (*Znp) ZdoServerDiscReq

func (znp *Znp) ZdoServerDiscReq(serverMask *ServerMask) (rsp *StatusResponse, err error)

ZdoServerDiscReq is used for local device to discover the location of a particular system server or servers as indicated by the ServerMask parameter. The destination addressing on this request is ‘broadcast to all RxOnWhenIdle devices’.

func (*Znp) ZdoSetLinkKey

func (znp *Znp) ZdoSetLinkKey(shortAddr string, ieeeAddr string, linkKeyData [16]uint8) (rsp *StatusResponse, err error)

ZdoSetLinkKey starts the device in the network.

func (*Znp) ZdoSetRejoinParameters

func (znp *Znp) ZdoSetRejoinParameters(backoffDuration uint32, scanDuration uint32) (rsp *StatusResponse, err error)

ZdoSetRejoinParameters is used to set rejoin backoff duration and rejoin scan duration for an end device

func (*Znp) ZdoSimpleDescReq

func (znp *Znp) ZdoSimpleDescReq(dstAddr string, nwkAddrOfInterest string, endpoint uint8) (rsp *StatusResponse, err error)

ZdoSimpleDescReq is generated to inquire as to the Simple Descriptor of the destination device’s Endpoint.

func (*Znp) ZdoStartupFromApp

func (znp *Znp) ZdoStartupFromApp(startDelay uint16) (rsp *ZdoStartupFromAppResponse, err error)

ZdoStartupFromApp starts the device in the network.

func (*Znp) ZdoUnbindReq

func (znp *Znp) ZdoUnbindReq(dstAddr string, srcAddress string, srcEndpoint uint8, clusterId uint16,
	dstAddrMode AddrMode, dstAddress string, dstEndpoint uint8) (rsp *StatusResponse, err error)

ZdoUnbindReq is generated to request a un-bind.

func (*Znp) ZdoUserDescReq

func (znp *Znp) ZdoUserDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error)

ZdoUserDescReq is generated to request for the destination device’s user descriptor

func (*Znp) ZdoUserDescSet

func (znp *Znp) ZdoUserDescSet(dstAddr string, nwkAddrOfInterest string, userDescriptor string) (rsp *StatusResponse, err error)

ZdoUserDescSet is generated to write a User Descriptor value to the targeted device.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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