func (znp *Znp) ZdoMgmtLqiReq(dstAddr string, startIndex uint8) (rsp *StatusResponse, err error) {
	req := &ZdoMgmtLqiReq{DstAddr: dstAddr, StartIndex: startIndex}
	err = znp.SendSync(unp.S_ZDO, 0x31, req, &rsp)
	return
}
request the destination device to perform a LQI query of other
devices in the network.
package znp
import (
	"fmt"
	"github.com/function61/hautomo/pkg/ezstack/zigbee"
	"github.com/function61/hautomo/pkg/ezstack/znp/unp"
)
func (znp *Znp) AfRegister(endPoint zigbee.EndpointId, appProfID uint16, appDeviceID uint16, addDevVer uint8,
	latencyReq Latency, appInClusterList []uint16, appOutClusterList []uint16) (rsp *StatusResponse, err error) {
	req := &AfRegister{EndPoint: endPoint, AppProfID: appProfID, AppDeviceID: appDeviceID,
		AddDevVer: addDevVer, LatencyReq: latencyReq, AppInClusterList: appInClusterList, AppOutClusterList: appOutClusterList}
	err = znp.SendSync(unp.S_AF, 0x00, req, &rsp)
	return
}
func (znp *Znp) AfDataRequest(dstAddr string, dstEndpoint zigbee.EndpointId, srcEndpoint zigbee.EndpointId, clusterId uint16,
	transId uint8, options *AfDataRequestOptions, radius uint8, data []uint8) (rsp *StatusResponse, err error) {
	req := &AfDataRequest{DstAddr: dstAddr, DstEndpoint: dstEndpoint, SrcEndpoint: srcEndpoint,
		ClusterID: clusterId, TransID: transId, Options: options, Radius: radius, Data: data}
	err = znp.SendSync(unp.S_AF, 0x01, req, &rsp)
	return
}
func (znp *Znp) AfDataRequestExt(dstAddrMode AddrMode, dstAddr string, dstEndpoint zigbee.EndpointId, dstPanId uint16,
	srcEndpoint zigbee.EndpointId, clusterId uint16, transId uint8, options *AfDataRequestOptions, radius uint8,
	data []uint8) (rsp *StatusResponse, err error) {
	req := &AfDataRequestExt{DstAddrMode: dstAddrMode, DstAddr: dstAddr, DstEndpoint: dstEndpoint, DstPanID: dstPanId, SrcEndpoint: srcEndpoint,
		ClusterID: clusterId, TransID: transId, Options: options, Radius: radius, Data: data}
	err = znp.SendSync(unp.S_AF, 0x02, req, &rsp)
	return
}
func (znp *Znp) AfDataRequestSrcRtg(dstAddr string, dstEndpoint zigbee.EndpointId, srcEndpoint zigbee.EndpointId, clusterId uint16,
	transId uint8, options *AfDataRequestSrcRtgOptions, radius uint8, relayList []string, data []uint8) (rsp *StatusResponse, err error) {
	req := &AfDataRequestSrcRtg{DstAddr: dstAddr, DstEndpoint: dstEndpoint, SrcEndpoint: srcEndpoint,
		ClusterID: clusterId, TransID: transId, Options: options, Radius: radius, RelayList: relayList, Data: data}
	err = znp.SendSync(unp.S_AF, 0x03, req, &rsp)
	return
}
func (znp *Znp) AfInterPanCtl(command InterPanCommand, data AfInterPanCtlData) (rsp *StatusResponse, err error) {
	req := &AfInterPanCtl{Command: command, Data: data}
	err = znp.SendSync(unp.S_AF, 0x10, req, &rsp)
	return
}
func (znp *Znp) AfDataStore(index uint16, data []uint8) (rsp *StatusResponse, err error) {
	req := &AfDataStore{Index: index, Data: data}
	err = znp.SendSync(unp.S_AF, 0x11, req, &rsp)
	return
}
func (znp *Znp) AfDataRetrieve(timestamp uint32, index uint16, length uint8) (rsp *AfDataRetrieveResponse, err error) {
	req := &AfDataRetrieve{Timestamp: timestamp, Index: index, Length: length}
	err = znp.SendSync(unp.S_AF, 0x12, req, &rsp)
	return
}
func (znp *Znp) AfApsfConfigSet(endpoint zigbee.EndpointId, frameDelay uint8, windowSize uint8) (rsp *StatusResponse, err error) {
	req := &AfApsfConfigSet{Endpoint: endpoint, FrameDelay: frameDelay, WindowSize: windowSize}
	err = znp.SendSync(unp.S_AF, 0x13, req, &rsp)
	return
}
func (znp *Znp) AppMsg(appEndpoint zigbee.EndpointId, dstAddr string, dstEndpoint zigbee.EndpointId, clusterID uint16,
	message []uint8) (rsp *StatusResponse, err error) {
	req := &AppMsg{AppEndpoint: appEndpoint, DstAddr: dstAddr, DstEndpoint: dstEndpoint,
		ClusterID: clusterID, Message: message}
	err = znp.SendSync(unp.S_APP, 0x00, req, &rsp)
	return
}
func (znp *Znp) AppUserTest(srcEndpoint zigbee.EndpointId, commandId uint16, parameter1 uint16, parameter2 uint16) (rsp *StatusResponse, err error) {
	req := &AppUserTest{SrcEndpoint: srcEndpoint, CommandID: commandId, Parameter1: parameter1, Parameter2: parameter2}
	err = znp.SendSync(unp.S_APP, 0x01, req, &rsp)
	return
}
func (znp *Znp) DebugSetThreshold(componentId uint8, threshold uint8) (rsp *StatusResponse, err error) {
	req := &DebugSetThreshold{ComponentID: componentId, Threshold: threshold}
	err = znp.SendSync(unp.S_DBG, 0x00, req, &rsp)
	return
}
func (znp *Znp) DebugMsg(str string) {
	req := &DebugMsg{String: str}
	znp.SendAsync(unp.S_DBG, 0x00, req, nil)
}
func (znp *Znp) SapiZbSystemReset() {
	znp.SendAsync(unp.S_SAPI, 0x09, nil, nil)
}
func (znp *Znp) SapiZbStartRequest() (rsp *EmptyResponse, err error) {
	err = znp.SendSync(unp.S_SAPI, 0x00, nil, &rsp)
	return
}
func (znp *Znp) SapiZbPermitJoiningRequest(destination string, timeout uint8) (rsp *StatusResponse, err error) {
	req := &SapiZbPermitJoiningRequest{Destination: destination, Timeout: timeout}
	err = znp.SendSync(unp.S_SAPI, 0x08, req, &rsp)
	return
}
func (znp *Znp) SapiZbBindDevice(create uint8, commandId uint16, destination string) (rsp *EmptyResponse, err error) {
	req := &SapiZbBindDevice{Create: create, CommandID: commandId, Destination: destination}
	err = znp.SendSync(unp.S_SAPI, 0x01, req, &rsp)
	return
}
func (znp *Znp) SapiZbAllowBind(timeout uint8) (rsp *EmptyResponse, err error) {
	req := &SapiZbAllowBind{Timeout: timeout}
	err = znp.SendSync(unp.S_SAPI, 0x02, req, &rsp)
	return
}
func (znp *Znp) SapiZbSendDataRequest(destination string, commandID uint16, handle uint8,
	ack uint8, radius uint8, data []uint8) (rsp *EmptyResponse, err error) {
	req := &SapiZbSendDataRequest{Destination: destination, CommandID: commandID,
		Handle: handle, Ack: ack, Radius: radius, Data: data}
	err = znp.SendSync(unp.S_SAPI, 0x03, req, &rsp)
	return
}
func (znp *Znp) SapiZbReadConfiguration(configID uint8) (rsp *SapiZbReadConfigurationResponse, err error) {
	req := &SapiZbReadConfiguration{ConfigID: configID}
	err = znp.SendSync(unp.S_SAPI, 0x04, req, &rsp)
	return
}
func (znp *Znp) SapiZbWriteConfiguration(configID uint8, value []uint8) (rsp *StatusResponse, err error) {
	req := &SapiZbWriteConfiguration{ConfigID: configID, Value: value}
	err = znp.SendSync(unp.S_SAPI, 0x05, req, &rsp)
	return
}
func (znp *Znp) SapiZbGetDeviceInfo(param uint8) (rsp *SapiZbGetDeviceInfoResponse, err error) {
	req := &SapiZbGetDeviceInfo{Param: param}
	err = znp.SendSync(unp.S_SAPI, 0x06, req, &rsp)
	return
}
func (znp *Znp) SapiZbFindDeviceRequest(searchKey string) (rsp *EmptyResponse, err error) {
	req := &SapiZbFindDeviceRequest{SearchKey: searchKey}
	err = znp.SendSync(unp.S_SAPI, 0x07, req, &rsp)
	return
}
func (znp *Znp) SysResetReq(resetType byte) {
	req := &SysResetReq{resetType}
	znp.SendAsync(unp.S_SYS, 0x00, req, nil)
}
func (znp *Znp) SysPing() (rsp *SysPingResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x01, nil, &rsp)
	return
}
func (znp *Znp) SysVersion() (rsp *SysVersionResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x02, nil, &rsp)
	return
}
func (znp *Znp) SysSetExtAddr(addr zigbee.IEEEAddress) (rsp *StatusResponse, err error) {
	req := &SysSetExtAddr{ExtAddress: addr.HexPrefixedString()}
	err = znp.SendSync(unp.S_SYS, 0x03, req, &rsp)
	return
}
func (znp *Znp) SysGetExtAddr() (rsp *SysGetExtAddrResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x04, nil, &rsp)
	return
}
func (znp *Znp) SysRamRead(address uint16, len uint8) (rsp *SysRamReadResponse, err error) {
	req := &SysRamRead{Address: address, Len: len}
	err = znp.SendSync(unp.S_SYS, 0x05, req, &rsp)
	return
}
func (znp *Znp) SysRamWrite(address uint16, value []uint8) (rsp *StatusResponse, err error) {
	req := &SysRamWrite{Address: address, Value: value}
	err = znp.SendSync(unp.S_SYS, 0x06, req, &rsp)
	return
}
func (znp *Znp) SysOsalNvItemInit(id uint16, itemLen uint16, initData []uint8) (rsp *StatusResponse, err error) {
	req := &SysOsalNvItemInit{ID: id, ItemLen: itemLen, InitData: initData}
	err = znp.SendSync(unp.S_SYS, 0x07, req, &rsp)
	return
}
func (znp *Znp) SysOsalNvDelete(id uint16, itemLen uint16) (rsp *StatusResponse, err error) {
	req := &SysOsalNvDelete{ID: id, ItemLen: itemLen}
	err = znp.SendSync(unp.S_SYS, 0x12, req, &rsp)
	return
}
func (znp *Znp) SysOsalNvLength(id uint16) (rsp *SysOsalNvLengthResponse, err error) {
	req := &SysOsalNvLength{ID: id}
	err = znp.SendSync(unp.S_SYS, 0x13, req, &rsp)
	return
}
func (znp *Znp) SysOsalStartTimer(id uint8, timeout uint16) (rsp *StatusResponse, err error) {
	req := &SysOsalStartTimer{ID: id, Timeout: timeout}
	err = znp.SendSync(unp.S_SYS, 0x0A, req, &rsp)
	return
}
func (znp *Znp) SysOsalStopTimer(id uint8) (rsp *StatusResponse, err error) {
	req := &SysOsalStopTimer{ID: id}
	err = znp.SendSync(unp.S_SYS, 0x0B, req, &rsp)
	return
}
func (znp *Znp) SysRandom() (rsp *SysRandomResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x0C, nil, &rsp)
	return
}
func (znp *Znp) SysAdcRead(channel Channel, resolution Resolution) (rsp *SysAdcReadResponse, err error) {
	req := &SysAdcRead{Channel: channel, Resolution: resolution}
	err = znp.SendSync(unp.S_SYS, 0x0D, req, &rsp)
	return
}
func (znp *Znp) SysGpio(operation Operation, value uint8) (rsp *SysGpioResponse, err error) {
	req := &SysGpio{Operation: operation, Value: value}
	err = znp.SendSync(unp.S_SYS, 0x0E, req, &rsp)
	return
}
func (znp *Znp) SysSetTime(utcTime uint32, hour uint8, minute uint8, second uint8,
	month uint8, day uint8, year uint16) (rsp *StatusResponse, err error) {
	req := &SysTime{UTCTime: utcTime, Hour: hour, Minute: minute, Second: second, Month: month, Day: day, Year: year}
	err = znp.SendSync(unp.S_SYS, 0x10, req, &rsp)
	return
}
func (znp *Znp) SysGetTime() (rsp *SysTime, err error) {
	err = znp.SendSync(unp.S_SYS, 0x11, nil, &rsp)
	return
}
func (znp *Znp) SysSetTxPower(txPower uint8) (rsp *SysSetTxPowerResponse, err error) {
	req := &SysSetTxPower{TXPower: txPower}
	err = znp.SendSync(unp.S_SYS, 0x14, req, &rsp)
	return
}
func (znp *Znp) SysZDiagsInitStats() (rsp *StatusResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x17, nil, &rsp)
	return
}
func (znp *Znp) SysZDiagsClearStats(clearNV uint8) (rsp *SysZDiagsClearStatsResponse, err error) {
	req := &SysZDiagsClearStats{ClearNV: clearNV}
	err = znp.SendSync(unp.S_SYS, 0x18, req, &rsp)
	return
}
func (znp *Znp) SysZDiagsGetStats(attributeID uint16) (rsp *SysZDiagsGetStatsResponse, err error) {
	req := &SysZDiagsGetStats{AttributeID: attributeID}
	err = znp.SendSync(unp.S_SYS, 0x19, req, &rsp)
	return
}
func (znp *Znp) SysZDiagsRestoreStatsNv() (rsp *StatusResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x1A, nil, &rsp)
	return
}
func (znp *Znp) SysZDiagsSaveStatsToNv() (rsp *SysZDiagsSaveStatsToNvResponse, err error) {
	err = znp.SendSync(unp.S_SYS, 0x1B, nil, &rsp)
	return
}
func (znp *Znp) SysNvCreate(sysID uint8, itemID uint16, subID uint16, length uint32) (rsp *StatusResponse, err error) {
	req := &SysNvCreate{SysID: sysID, ItemID: itemID, SubID: subID, Length: length}
	err = znp.SendSync(unp.S_SYS, 0x30, req, &rsp)
	return
}
func (znp *Znp) SysNvDelete(sysID uint8, itemID uint16, subID uint16) (rsp *StatusResponse, err error) {
	req := &SysNvDelete{SysID: sysID, ItemID: itemID, SubID: subID}
	err = znp.SendSync(unp.S_SYS, 0x31, req, &rsp)
	return
}
func (znp *Znp) SysNvLength(sysID uint8, itemID uint16, subID uint16) (rsp *SysNvLengthResponse, err error) {
	req := &SysNvLength{SysID: sysID, ItemID: itemID, SubID: subID}
	err = znp.SendSync(unp.S_SYS, 0x32, req, &rsp)
	return
}
func (znp *Znp) SysNvRead(sysID uint8, itemID uint16, subID uint16, offset uint16, length uint8) (rsp *SysNvReadResponse, err error) {
	req := &SysNvRead{SysID: sysID, ItemID: itemID, SubID: subID, Offset: offset, Length: length}
	err = znp.SendSync(unp.S_SYS, 0x33, req, &rsp)
	return
}
func (znp *Znp) SysNvWrite(sysID uint8, itemID uint16, subID uint16, offset uint16, value []uint8) (rsp *StatusResponse, err error) {
	req := &SysNvWrite{SysID: sysID, ItemID: itemID, SubID: subID, Offset: offset, Value: value}
	err = znp.SendSync(unp.S_SYS, 0x34, req, &rsp)
	return
}
func (znp *Znp) SysNvUpdate(sysID uint8, itemID uint16, subID uint16, value []uint8) (rsp *StatusResponse, err error) {
	req := &SysNvUpdate{SysID: sysID, ItemID: itemID, SubID: subID, Value: value}
	err = znp.SendSync(unp.S_SYS, 0x35, req, &rsp)
	return
}
func (znp *Znp) SysNvCompact(threshold uint16) (rsp *StatusResponse, err error) {
	req := &SysNvCompact{Threshold: threshold}
	err = znp.SendSync(unp.S_SYS, 0x36, req, &rsp)
	return
}
func (znp *Znp) SysNvReadExt(id uint16, offset uint16) (rsp *SysNvReadResponse, err error) {
	req := &SysNvReadExt{ID: id, Offset: offset}
	err = znp.SendSync(unp.S_SYS, 0x08, req, &rsp)
	return
}
func (znp *Znp) SysNvWriteExt(id uint16, offset uint16, value []uint8) (rsp *StatusResponse, err error) {
	req := &SysNvWriteExt{ID: id, Offset: offset, Value: value}
	err = znp.SendSync(unp.S_SYS, 0x09, req, &rsp)
	return
}
func (znp *Znp) UtilGetDeviceInfo() (rsp *UtilGetDeviceInfoResponse, err error) {
	err = znp.SendSync(unp.S_UTIL, 0x00, nil, &rsp)
	return
}
func (znp *Znp) UtilSetPanId(panId zigbee.PANID) (rsp *StatusResponse, err error) {
	req := &UtilSetPanId{PanID: panId}
	err = znp.SendSync(unp.S_UTIL, 0x02, req, &rsp)
	return
}
func (znp *Znp) UtilSetChannels(channels *Channels) (rsp *StatusResponse, err error) {
	req := &UtilSetChannels{Channels: channels}
	err = znp.SendSync(unp.S_UTIL, 0x03, req, &rsp)
	return
}
func (znp *Znp) UtilSetSecLevel(secLevel uint8) (rsp *StatusResponse, err error) {
	req := &UtilSetSecLevel{SecLevel: secLevel}
	err = znp.SendSync(unp.S_UTIL, 0x04, req, &rsp)
	return
}
func (znp *Znp) UtilSetPreCfgKey(key []byte) (rsp *StatusResponse, err error) {
	preCfgKey := [16]byte{}
	if copy(preCfgKey[:], key) != 16 {
		return nil, fmt.Errorf("invalid length for network key: %d", len(key))
	}
	req := &UtilSetPreCfgKey{PreCfgKey: preCfgKey}
	err = znp.SendSync(unp.S_UTIL, 0x05, req, &rsp)
	return
}
func (znp *Znp) UtilCallbackSubCmd(subsystemID SubsystemId, action Action) (rsp *StatusResponse, err error) {
	req := &UtilCallbackSubCmd{SubsystemID: subsystemID, Action: action}
	err = znp.SendSync(unp.S_UTIL, 0x06, req, &rsp)
	return
}
func (znp *Znp) UtilKeyEvent(keys *Keys, shift Shift) (rsp *StatusResponse, err error) {
	req := &UtilKeyEvent{Keys: keys, Shift: shift}
	err = znp.SendSync(unp.S_UTIL, 0x07, req, &rsp)
	return
}
func (znp *Znp) UtilTimeAlive() (rsp *UtilTimeAliveResponse, err error) {
	err = znp.SendSync(unp.S_UTIL, 0x09, nil, &rsp)
	return
}
func (znp *Znp) UtilLedControl(ledID uint8, mode Mode) (rsp *StatusResponse, err error) {
	req := &UtilLedControl{LedID: ledID, Mode: mode}
	err = znp.SendSync(unp.S_UTIL, 0x0A, req, &rsp)
	return
}
func (znp *Znp) UtilLoopback(data []uint8) (rsp *UtilLoopback, err error) {
	req := &UtilLoopback{Data: data}
	err = znp.SendSync(unp.S_UTIL, 0x10, req, &rsp)
	return
}
func (znp *Znp) UtilDataReq(securityUse uint8) (rsp *StatusResponse, err error) {
	req := &UtilDataReq{SecurityUse: securityUse}
	err = znp.SendSync(unp.S_UTIL, 0x11, req, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchEnable() (rsp *StatusResponse, err error) {
	err = znp.SendSync(unp.S_UTIL, 0x20, nil, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchAddEntry(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error) {
	req := &UtilSrcMatchAddEntry{AddrMode: addrMode, Address: address, PanID: panId}
	err = znp.SendSync(unp.S_UTIL, 0x21, req, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchDelEntry(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error) {
	req := &UtilSrcMatchDelEntry{AddrMode: addrMode, Address: address, PanID: panId}
	err = znp.SendSync(unp.S_UTIL, 0x22, req, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchCheckSrcAddr(addrMode AddrMode, address string, panId uint16) (rsp *StatusResponse, err error) {
	req := &UtilSrcMatchCheckSrcAddr{AddrMode: addrMode, Address: address, PanID: panId}
	err = znp.SendSync(unp.S_UTIL, 0x23, req, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchAckAllPending(option Action) (rsp *StatusResponse, err error) {
	req := &UtilSrcMatchAckAllPending{Option: option}
	err = znp.SendSync(unp.S_UTIL, 0x24, req, &rsp)
	return
}
func (znp *Znp) UtilSrcMatchCheckAllPending() (rsp *UtilSrcMatchCheckAllPendingResponse, err error) {
	err = znp.SendSync(unp.S_UTIL, 0x25, nil, &rsp)
	return
}
func (znp *Znp) UtilAddrMgrExtAddrLookup(extAddr string) (rsp *UtilAddrMgrExtAddrLookupResponse, err error) {
	req := &UtilAddrMgrExtAddrLookup{ExtAddr: extAddr}
	err = znp.SendSync(unp.S_UTIL, 0x40, req, &rsp)
	return
}
func (znp *Znp) UtilAddrMgrAddrLookup(nwkAddr string) (rsp *UtilAddrMgrAddrLookupResponse, err error) {
	req := &UtilAddrMgrAddrLookup{NwkAddr: nwkAddr}
	err = znp.SendSync(unp.S_UTIL, 0x41, req, &rsp)
	return
}
func (znp *Znp) UtilApsmeLinkKeyDataGet(extAddr string) (rsp *UtilApsmeLinkKeyDataGetResponse, err error) {
	req := &UtilApsmeLinkKeyDataGet{ExtAddr: extAddr}
	err = znp.SendSync(unp.S_UTIL, 0x44, req, &rsp)
	return
}
func (znp *Znp) UtilApsmeLinkKeyNvIdGet(extAddr string) (rsp *UtilApsmeLinkKeyNvIdGetResponse, err error) {
	req := &UtilApsmeLinkKeyNvIdGet{ExtAddr: extAddr}
	err = znp.SendSync(unp.S_UTIL, 0x45, req, &rsp)
	return
}
func (znp *Znp) UtilApsmeRequestKeyCmd(partnerAddr string) (rsp *StatusResponse, err error) {
	req := &UtilApsmeRequestKeyCmd{PartnerAddr: partnerAddr}
	err = znp.SendSync(unp.S_UTIL, 0x4B, req, &rsp)
	return
}
func (znp *Znp) UtilAssocCount(startRelation Relation, endRelation Relation) (rsp *UtilAssocCountResponse, err error) {
	req := &UtilAssocCount{StartRelation: startRelation, EndRelation: endRelation}
	err = znp.SendSync(unp.S_UTIL, 0x48, req, &rsp)
	return
}
func (znp *Znp) UtilAssocFindDevice(number uint8) (rsp *UtilAssocFindDeviceResponse, err error) {
	req := &UtilAssocFindDevice{Number: number}
	err = znp.SendSync(unp.S_UTIL, 0x49, req, &rsp)
	return
}
func (znp *Znp) UtilAssocGetWithAddr(extAddr string, nwkAddr string) (rsp *UtilAssocGetWithAddrResponse, err error) {
	req := &UtilAssocGetWithAddr{ExtAddr: extAddr, NwkAddr: nwkAddr}
	err = znp.SendSync(unp.S_UTIL, 0x4A, req, &rsp)
	return
}
func (znp *Znp) UtilBindAddEntry(addrMode AddrMode, dstAddr string, dstEndpoint zigbee.EndpointId, clusterIds []uint16) (rsp *UtilBindAddEntryResponse, err error) {
	req := &UtilBindAddEntry{AddrMode: addrMode, DstAddr: dstAddr, DstEndpoint: dstEndpoint, ClusterIDs: clusterIds}
	err = znp.SendSync(unp.S_UTIL, 0x4D, req, &rsp)
	return
}
func (znp *Znp) UtilZclKeyEstInitEst(taskId uint8, seqNum uint8, endPoint zigbee.EndpointId, addrMode AddrMode, addr string) (rsp *StatusResponse, err error) {
	req := &UtilZclKeyEstInitEst{TaskID: taskId, SeqNum: seqNum, EndPoint: endPoint, AddrMode: addrMode, Addr: addr}
	err = znp.SendSync(unp.S_UTIL, 0x80, req, &rsp)
	return
}
func (znp *Znp) UtilZclKeyEstSign(input []uint8) (rsp *UtilZclKeyEstSignResponse, err error) {
	req := &UtilZclKeyEstSign{Input: input}
	err = znp.SendSync(unp.S_UTIL, 0x81, req, &rsp)
	return
}
func (znp *Znp) UtilSrngGen() (rsp *UtilSrngGenResponse, err error) {
	err = znp.SendSync(unp.S_UTIL, 0x4C, nil, &rsp)
	return
}
func (znp *Znp) UtilSyncReq() {
	znp.SendAsync(unp.S_UTIL, 0xE0, nil, nil)
}
func (znp *Znp) ZdoNwkAddrReq(ieeeAddress string, reqType ReqType, startIndex uint8) (rsp *StatusResponse, err error) {
	req := &ZdoNwkAddrReq{IEEEAddress: ieeeAddress, ReqType: reqType, StartIndex: startIndex}
	err = znp.SendSync(unp.S_ZDO, 0x00, req, &rsp)
	return
}
func (znp *Znp) ZdoIeeeAddrReq(shortAddr string, reqType ReqType, startIndex uint8) (rsp *StatusResponse, err error) {
	req := &ZdoIeeeAddrReq{ShortAddr: shortAddr, ReqType: reqType, StartIndex: startIndex}
	err = znp.SendSync(unp.S_ZDO, 0x01, req, &rsp)
	return
}
func (znp *Znp) ZdoNodeDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error) {
	req := &ZdoNodeDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest}
	err = znp.SendSync(unp.S_ZDO, 0x02, req, &rsp)
	return
}
func (znp *Znp) ZdoPowerDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error) {
	req := &ZdoPowerDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest}
	err = znp.SendSync(unp.S_ZDO, 0x03, req, &rsp)
	return
}
func (znp *Znp) ZdoSimpleDescReq(dstAddr string, nwkAddrOfInterest string, endpoint zigbee.EndpointId) (rsp *StatusResponse, err error) {
	req := &ZdoSimpleDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest, Endpoint: endpoint}
	err = znp.SendSync(unp.S_ZDO, 0x04, req, &rsp)
	return
}
func (znp *Znp) ZdoActiveEpReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error) {
	req := &ZdoActiveEpReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest}
	err = znp.SendSync(unp.S_ZDO, 0x05, req, &rsp)
	return
}
func (znp *Znp) ZdoMatchDescReq(dstAddr string, nwkAddrOfInterest string, profileId uint16,
	inClusterList []uint16, outClusterList []uint16) (rsp *StatusResponse, err error) {
	req := &ZdoMatchDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest, ProfileID: profileId,
		InClusterList: inClusterList, OutClusterList: outClusterList}
	err = znp.SendSync(unp.S_ZDO, 0x06, req, &rsp)
	return
}
func (znp *Znp) ZdoComplexDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error) {
	req := &ZdoComplexDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest}
	err = znp.SendSync(unp.S_ZDO, 0x07, req, &rsp)
	return
}
func (znp *Znp) ZdoUserDescReq(dstAddr string, nwkAddrOfInterest string) (rsp *StatusResponse, err error) {
	req := &ZdoUserDescReq{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest}
	err = znp.SendSync(unp.S_ZDO, 0x08, req, &rsp)
	return
}
func (znp *Znp) ZdoEndDeviceAnnce(nwkAddr string, ieeeAddr string, capabilities *CapInfo) (rsp *StatusResponse, err error) {
	req := &ZdoEndDeviceAnnce{NwkAddr: nwkAddr, IEEEAddr: ieeeAddr, Capabilities: capabilities}
	err = znp.SendSync(unp.S_ZDO, 0x0A, req, &rsp)
	return
}
func (znp *Znp) ZdoUserDescSet(dstAddr string, nwkAddrOfInterest string, userDescriptor string) (rsp *StatusResponse, err error) {
	req := &ZdoUserDescSet{DstAddr: dstAddr, NWKAddrOfInterest: nwkAddrOfInterest, UserDescriptor: userDescriptor}
	err = znp.SendSync(unp.S_ZDO, 0x0B, req, &rsp)
	return
}
func (znp *Znp) ZdoServerDiscReq(serverMask *ServerMask) (rsp *StatusResponse, err error) {
	req := &ZdoServerDiscReq{ServerMask: serverMask}
	err = znp.SendSync(unp.S_ZDO, 0x0C, req, &rsp)
	return
}
func (znp *Znp) ZdoEndDeviceBindReq(dstAddr string, localCoordinatorAddr string, ieeeAddr string, endpoint zigbee.EndpointId,
	profileId uint16, inClusterList []uint16, outClusterList []uint16) (rsp *StatusResponse, err error) {
	req := &ZdoEndDeviceBindReq{DstAddr: dstAddr, LocalCoordinatorAddr: localCoordinatorAddr, IEEEAddr: ieeeAddr,
		Endpoint: endpoint, ProfileID: profileId, InClusterList: inClusterList, OutClusterList: outClusterList}
	err = znp.SendSync(unp.S_ZDO, 0x20, req, &rsp)
	return
}
func (znp *Znp) ZdoBindReq(dstAddr string, srcAddress string, srcEndpoint zigbee.EndpointId, clusterId uint16,
	dstAddrMode AddrMode, dstAddress string, dstEndpoint zigbee.EndpointId) (rsp *StatusResponse, err error) {
	req := &ZdoBindUnbindReq{DstAddr: dstAddr, SrcAddress: srcAddress, SrcEndpoint: srcEndpoint, ClusterID: clusterId,
		DstAddrMode: dstAddrMode, DstAddress: dstAddress, DstEndpoint: dstEndpoint}
	err = znp.SendSync(unp.S_ZDO, 0x21, req, &rsp)
	return
}
func (znp *Znp) ZdoUnbindReq(dstAddr string, srcAddress string, srcEndpoint zigbee.EndpointId, clusterId uint16,
	dstAddrMode AddrMode, dstAddress string, dstEndpoint zigbee.EndpointId) (rsp *StatusResponse, err error) {
	req := &ZdoBindUnbindReq{DstAddr: dstAddr, SrcAddress: srcAddress, SrcEndpoint: srcEndpoint, ClusterID: clusterId,
		DstAddrMode: dstAddrMode, DstAddress: dstAddress, DstEndpoint: dstEndpoint}
	err = znp.SendSync(unp.S_ZDO, 0x22, req, &rsp)
	return
}
func (znp *Znp) ZdoMgmtNwkDiskReq(dstAddr string, scanChannels *Channels, scanDuration uint8, startIndex uint8) (rsp *StatusResponse, err error) {
	req := &ZdoMgmtNwkDiskReq{DstAddr: dstAddr, ScanChannels: scanChannels, ScanDuration: scanDuration, StartIndex: startIndex}
	err = znp.SendSync(unp.S_ZDO, 0x30, req, &rsp)
	return
}