ZigBee Device Object (ZDO) functions included in the stack.

See ZigBee Device Object for documentation.

License#

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

/***************************************************************************/
#ifndef SILABS_ZIGBEE_DEVICE_STACK_H
#define SILABS_ZIGBEE_DEVICE_STACK_H

EmberStatus emberNetworkAddressRequest(EmberEUI64 target,
                                       bool reportKids,
                                       uint8_t childStartIndex);

EmberStatus emberIeeeAddressRequest(EmberNodeId target,
                                    bool reportKids,
                                    uint8_t childStartIndex,
                                    EmberApsOption options);

EmberStatus emberIeeeAddressRequestToTarget(EmberNodeId discoveryNodeId,
                                            bool reportKids,
                                            uint8_t childStartIndex,
                                            EmberApsOption options,
                                            EmberNodeId targetNodeIdOfRequest);

EmberStatus emberEnergyScanRequest(EmberNodeId target,
                                   uint32_t scanChannels,
                                   uint8_t  scanDuration,
                                   uint16_t scanCount);

#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberSetNetworkManagerRequest(EmberNodeId networkManager,
                                          uint32_t activeChannels);
#else
#define emberSetNetworkManagerRequest(manager, channels)  \
  (emberEnergyScanRequest(EMBER_SLEEPY_BROADCAST_ADDRESS, \
                          (channels),                     \
                          0xFF,                           \
                          (manager)))
#endif

#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberChannelChangeRequest(uint8_t channel);
#else
#define emberChannelChangeRequest(channel)                \
  (emberEnergyScanRequest(EMBER_SLEEPY_BROADCAST_ADDRESS, \
                          BIT32(channel),                 \
                          0xFE,                           \
                          0))
#endif

EmberStatus emberSendDeviceAnnouncement(void);

EmberStatus emberSendParentAnnouncement(void);

uint8_t emberGetLastStackZigDevRequestSequence(void);

void emberSetZDOConfigurationMode(bool enabled);

void emberSetPendingNetworkUpdateChannel(uint8_t channel);

void sl_set_device_capability_extension_field_for_zigbee_virtual_device(boolean attach_tlv, uint16_t capability_extension_bitmask);

#endif  // SILABS_ZIGBEE_DEVICE_STACK_H

Functions#

emberNetworkAddressRequest(EmberEUI64 target, bool reportKids, uint8_t childStartIndex)

Request the 16 bit network address of a node whose EUI64 is known.

emberIeeeAddressRequest(EmberNodeId target, bool reportKids, uint8_t childStartIndex, EmberApsOption options)

Request the EUI64 of a node whose 16 bit network address is known.

emberIeeeAddressRequestToTarget(EmberNodeId discoveryNodeId, bool reportKids, uint8_t childStartIndex, EmberApsOption options, EmberNodeId targetNodeIdOfRequest)
emberEnergyScanRequest(EmberNodeId target, uint32_t scanChannels, uint8_t scanDuration, uint16_t scanCount)

Request that an energy scan be performed and its results returned. This request may only be sent by the current network manager and must be unicast, not broadcast.

emberSetNetworkManagerRequest(EmberNodeId networkManager, uint32_t activeChannels)

Broadcast a request to set the identity of the network manager and the active channel mask. The mask is used when scanning for the network after missing a channel update.

emberChannelChangeRequest(uint8_t channel)

Broadcast a request to change the channel. This request may only be sent by the current network manager. A several second delay occurs from receipt of the broadcast to changing the channel to allow time for the broadcast to propagate.

Send a broadcast for a ZDO Device announcement. Normally, it is NOT required to call this as the stack automatically sends a device announcement during joining or rejoining, as per the spec.

Send a broadcast for a ZDO Parent Announcement. Normally, it is NOT required to call this as the stack automatically sends a Parent Announce when a Zigbee Router/Coordinator reboots, is in a joined or authenticated state, and has at least one device.

uint8_t

Provide access to the stack ZDO transaction sequence number for the last request.

void

Set the ZDO (WWAH) configuration mode in the stack. ZDO configuration mode is used to enable/disable ZDO command processing and to protect the device from unauthorized configuration changes during normal operation.

void

Set the channel number the device will accept in ZDO Mgmt Network Update command to change channel.

void
sl_set_device_capability_extension_field_for_zigbee_virtual_device(boolean attach_tlv, uint16_t capability_extension_bitmask)

This is an API to set the device capability extension TLV used by Zigbee Direct.

Function Documentation#

emberNetworkAddressRequest#

EmberStatus emberNetworkAddressRequest (EmberEUI64 target, bool reportKids, uint8_t childStartIndex)

Request the 16 bit network address of a node whose EUI64 is known.

Parameters
N/Atarget

The EUI64 of the node.

N/AreportKids

True to request that the target list their children in the response.

N/AchildStartIndex

The index of the first child to list in the response. Ignored if reportKids is false.

Returns


Definition at line 45 of file stack/include/zigbee-device-stack.h

emberIeeeAddressRequest#

EmberStatus emberIeeeAddressRequest (EmberNodeId target, bool reportKids, uint8_t childStartIndex, EmberApsOption options)

Request the EUI64 of a node whose 16 bit network address is known.

Parameters
N/Atarget

The network address of the node.

N/AreportKids

True to request that the target list their children in the response.

N/AchildStartIndex

The index of the first child to list in the response. Ignored if reportKids is false.

N/Aoptions

The options to use when sending the request. See emberSendUnicast() for a description.

Returns


Definition at line 65 of file stack/include/zigbee-device-stack.h

emberIeeeAddressRequestToTarget#

EmberStatus emberIeeeAddressRequestToTarget (EmberNodeId discoveryNodeId, bool reportKids, uint8_t childStartIndex, EmberApsOption options, EmberNodeId targetNodeIdOfRequest)
Parameters
N/AdiscoveryNodeId
N/AreportKids
N/AchildStartIndex
N/Aoptions
N/AtargetNodeIdOfRequest

Definition at line 70 of file stack/include/zigbee-device-stack.h

emberEnergyScanRequest#

EmberStatus emberEnergyScanRequest (EmberNodeId target, uint32_t scanChannels, uint8_t scanDuration, uint16_t scanCount)

Request that an energy scan be performed and its results returned. This request may only be sent by the current network manager and must be unicast, not broadcast.

Parameters
N/Atarget

The network address of the node to perform the scan.

N/AscanChannels

A mask of the channels to be scanned.

N/AscanDuration

How long to scan on each channel. Allowed values are 0..5, with the scan times as specified by 802.15.4 (0 = 31 ms, 1 = 46 ms, 2 = 77 ms, 3 = 138 ms, 4 = 261 ms, 5 = 507 ms).

N/AscanCount

The number of scans to be performed on each channel (1 .. 8).

Returns


Definition at line 95 of file stack/include/zigbee-device-stack.h

emberSetNetworkManagerRequest#

EmberStatus emberSetNetworkManagerRequest (EmberNodeId networkManager, uint32_t activeChannels)

Broadcast a request to set the identity of the network manager and the active channel mask. The mask is used when scanning for the network after missing a channel update.

Parameters
N/AnetworkManager

The network address of the network manager.

N/AactiveChannels

The new active channel mask.

Returns


Definition at line 114 of file stack/include/zigbee-device-stack.h

emberChannelChangeRequest#

EmberStatus emberChannelChangeRequest (uint8_t channel)

Broadcast a request to change the channel. This request may only be sent by the current network manager. A several second delay occurs from receipt of the broadcast to changing the channel to allow time for the broadcast to propagate.

Parameters
N/Achannel

The channel to change to.

Returns


Definition at line 138 of file stack/include/zigbee-device-stack.h

emberSendDeviceAnnouncement#

EmberStatus emberSendDeviceAnnouncement (void )

Send a broadcast for a ZDO Device announcement. Normally, it is NOT required to call this as the stack automatically sends a device announcement during joining or rejoining, as per the spec.

Parameters
N/A

May be used to re-send the device announcement.

Returns


Definition at line 157 of file stack/include/zigbee-device-stack.h

emberSendParentAnnouncement#

EmberStatus emberSendParentAnnouncement (void )

Send a broadcast for a ZDO Parent Announcement. Normally, it is NOT required to call this as the stack automatically sends a Parent Announce when a Zigbee Router/Coordinator reboots, is in a joined or authenticated state, and has at least one device.

Parameters
N/A

May be used to re-send the parent announcement.

Returns


Definition at line 170 of file stack/include/zigbee-device-stack.h

emberGetLastStackZigDevRequestSequence#

uint8_t emberGetLastStackZigDevRequestSequence (void )

Provide access to the stack ZDO transaction sequence number for the last request.

Parameters
N/A

Returns

  • The last stack ZDO transaction sequence number used.


Definition at line 178 of file stack/include/zigbee-device-stack.h

emberSetZDOConfigurationMode#

void emberSetZDOConfigurationMode (bool enabled)

Set the ZDO (WWAH) configuration mode in the stack. ZDO configuration mode is used to enable/disable ZDO command processing and to protect the device from unauthorized configuration changes during normal operation.

Parameters
N/Aenabled

Definition at line 190 of file stack/include/zigbee-device-stack.h

emberSetPendingNetworkUpdateChannel#

void emberSetPendingNetworkUpdateChannel (uint8_t channel)

Set the channel number the device will accept in ZDO Mgmt Network Update command to change channel.

Parameters
N/Achannel

A pending network update channel number.

If a ZDO Mgmt Network Update command is received by the device specifying a channel that does not match with the given channel, the ZDO Mgmt Network Update command will be ignored by the device. A value of 0xFF indicates that any channel received in a ZDO Mgmt Network Update command will be accepted which is also the default value set by the stack.


Definition at line 204 of file stack/include/zigbee-device-stack.h

sl_set_device_capability_extension_field_for_zigbee_virtual_device#

void sl_set_device_capability_extension_field_for_zigbee_virtual_device (boolean attach_tlv, uint16_t capability_extension_bitmask)

This is an API to set the device capability extension TLV used by Zigbee Direct.

Parameters
N/Aattach_tlv

boolean value to indicate if the tlv should be attached to the joiner encapsulation tlv , set true to attach

N/Acapability_extension_bitmask

2 bytes value to be set as described in the Zigbee Direct specification.

If the local device is a Zigbee virtual Device it needs to present the capability extension TLV in the network commissioning request within the joiner encapsulation TLV. This is required only for a Zigbee Virtual Device.


Definition at line 216 of file stack/include/zigbee-device-stack.h