nRF5 SDK for Thread and Zigbee v4.1.0
Macros | Typedefs | Enumerations
Compile-time configuration parameters

Macros

#define ZB_DEFAULT_APS_CHANNEL_MASK   (ZB_TRANSCEIVER_ALL_CHANNELS_MASK)
 
#define ZB_NEIGHBOR_TABLE_SIZE   32
 
#define ZB_APS_SRC_BINDING_TABLE_SIZE   32
 
#define ZB_APS_DST_BINDING_TABLE_SIZE   32
 
#define ZB_APS_GROUP_UP_Q_SIZE   8
 
#define ZB_N_APS_KEY_PAIR_ARR_MAX_SIZE   5
 
#define ZB_APS_SECURITY_TIME_OUT_PERIOD   ZB_MILLISECONDS_TO_BEACON_INTERVAL(1700)
 
#define ZB_N_APS_ACK_WAIT_DURATION(_rx_on_when_idle)
 
#define ZB_IEEE_ADDR_TABLE_SIZE   101
 
#define ZB_DEFAULT_SCAN_DURATION   3
 
#define ZB_ZDO_PENDING_LEAVE_SIZE   4
 
#define ZB_CHANNEL_PAGES_NUM   1
 
#define ZB_IO_BUF_SIZE   172
 
#define ZB_APS_MAX_IN_FRAGMENT_TRANSMISSIONS   3
 
#define ZB_NWK_ROUTING_FAILURE_ATTEMTS_NUM   1
 
#define ZB_NWK_ROUTING_FAILURE_EXPIRY_STEP   (ZB_NWK_ROUTING_TABLE_EXPIRY / ZB_NWK_ROUTING_FAILURE_ATTEMTS_NUM)
 
#define ZB_ZDO_PARENT_LINK_FAILURE_CNT   12
 
#define ZB_WATCHDOG_SCHED_QUANT   (20 * ZB_TIME_ONE_SECOND)
 
#define MAC_FRAME_VERSION   MAC_FRAME_IEEE_802_15_4_2003
 
#define ZB_N_BUF_IDS   (ZB_IOBUF_POOL_SIZE + 1)
 
#define ZB_PRODUCTION_CONFIG_MAX_SIZE   128
 
#define ZB_PRODUCTION_CONFIG_CURRENT_VERSION   ZB_PRODUCTION_CONFIG_VERSION_2_0
 
#define ZB_STANDARD_TC_KEY   {0x5A, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6C, 0x6C, 0x69, 0x61, 0x6E, 0x63, 0x65, 0x30, 0x39 };
 
#define ZB_DISTRIBUTED_GLOBAL_KEY   {0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf};
 
#define ZB_CCM_KEY_SIZE   16
 
#define ZB_SECUR_N_SECUR_MATERIAL   3
 
#define ZB_SECURITY_LEVEL   5
 
#define ZB_MAC_INDIRECT_POLL_EXPIRE_TMO   ZB_MILLISECONDS_TO_BEACON_INTERVAL(7680)
 
#define ZB_N_APS_MAX_FRAME_RETRIES   3
 
#define ZB_N_APS_ACK_WAIT_DURATION_FROM_SLEEPY   (10*ZB_TIME_ONE_SECOND)
 
#define ZB_N_APS_ACK_WAIT_DURATION_FROM_NON_SLEEPY   (3*ZB_TIME_ONE_SECOND)
 
#define ZB_N_APS_BINDTRANS_ARR_MAX_SIZE   5
 
#define ZB_N_APS_BINDTRANS_DST_INDEX_ARR_MAX_SIZE   ZB_APS_DST_BINDING_TABLE_SIZE
 
#define ZB_APS_MAX_PAYLOAD_SIZE   (ZB_APS_MAX_BROADCAST_PAYLOAD_SIZE - 8)
 
#define APS_IN_FRAG_MAX_BUF_SIZE   1500
 
#define ZB_NWK_LINK_STATUS_PERIOD   0xf
 
#define ZB_NWK_ROUTER_AGE_LIMIT   3
 
#define ZB_NWK_REJOIN_TIMEOUT   (ZB_TIME_ONE_SECOND * 5)
 
#define ZB_NWK_REJOIN_FIRST_POLL_DELAY   (ZB_TIME_ONE_SECOND / 2)
 
#define ZB_NWK_REJOIN_POLL_ATTEMPTS   3
 
#define ZB_DEFAULT_MAX_CHILDREN   32
 
#define ZB_PIM_DEFAULT_FAST_POLL_TIMEOUT   (ZB_TIME_ONE_SECOND * 10)
 
#define ZB_PIM_DEFAULT_FAST_POLL_INTERVAL   ZB_QUARTERECONDS_TO_BEACON_INTERVAL(2)
 
#define ZB_PIM_DEFAULT_LONG_POLL_INTERVAL   (ZB_TIME_ONE_SECOND * 5)
 
#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(100)
 
#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(100)
 
#define ZB_PIM_DEFAULT_MAX_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(3000)
 
#define ZB_PIM_TURBO_POLL_PACKETS_TIMEOUT   (ZB_TIME_ONE_SECOND * 15)
 
#define ZB_PIM_TURBO_POLL_LEAVE_TIMEOUT   (ZB_TIME_ONE_SECOND / 3)
 
#define ZB_ZDO_NWK_TIME_BTWN_SCANS   30
 
#define ZB_ZDO_NWK_SCAN_ATTEMPTS   5
 
#define ZB_STACK_SPEC_VERSION   22
 

Typedefs

typedef enum
zb_production_config_version_e 
zb_production_config_version_t
 

Enumerations

enum  zb_production_config_version_e { ZB_PRODUCTION_CONFIG_VERSION_1_0 = 0x01, ZB_PRODUCTION_CONFIG_VERSION_2_0 = 0x02 }
 

Detailed Description

Most of the mentioned defines can be used only as an additional source of information about ZBOSS Stack.

Value of some defines can be changed in the application, see detailed instruction in Configurable ZBOSS memory sizes

Macro Definition Documentation

#define APS_IN_FRAG_MAX_BUF_SIZE   1500

Maximum buffer size for APS fragmentation. Bigger buffer will not be created for APS fragmentation

#define MAC_FRAME_VERSION   MAC_FRAME_IEEE_802_15_4_2003

Default value for mac frame version subfield

#define ZB_APS_DST_BINDING_TABLE_SIZE   32

APS: DST binding table size

Note
This is a default value of the define. This value can be changed by user.
#define ZB_APS_GROUP_UP_Q_SIZE   8

APS: size of queue to be used to pass incoming group addresses packets up

#define ZB_APS_MAX_IN_FRAGMENT_TRANSMISSIONS   3

Number of fragmented packets which ZBOSS can receive in parallel

#define ZB_APS_MAX_PAYLOAD_SIZE   (ZB_APS_MAX_BROADCAST_PAYLOAD_SIZE - 8)

Maximum unicast APS payload size, if no APS encryption is provided

#define ZB_APS_SECURITY_TIME_OUT_PERIOD   ZB_MILLISECONDS_TO_BEACON_INTERVAL(1700)

If the joining device does not receive any of the keys within apsSecurityTimeOutPeriod, of receiving the NLME-JOIN. confirm primitive, it shall reset

apsSecurityTimeOutPeriod value is not defined by specification and should be defined in stack profile. For ZB_PRO_STACK this value equal to 1.7 seconds on 2.4 GHz.

See Zigbee specification revision 22 subclause 4.4.11

#define ZB_APS_SRC_BINDING_TABLE_SIZE   32

APS: SRC binding table size

Note
This is a default value of the define. This value can be changed by user.
#define ZB_CCM_KEY_SIZE   16

SECUR: CCM key size. Hard-coded

#define ZB_CHANNEL_PAGES_NUM   1

Size of channel list structure

#define ZB_DEFAULT_APS_CHANNEL_MASK   (ZB_TRANSCEIVER_ALL_CHANNELS_MASK)

Zigbee channel selection. Default value of ZB_AIB().aps_channel_mask Channels to be used for discovery and join. If a single channel is selected, there is no need to perform energy scan.

Note
ZLL, HA, ZLL tests can redefine this mask with the means of other constants.
#define ZB_DEFAULT_MAX_CHILDREN   32

Default value of nib.max_children - max number of children which can join to this device

See Zigbee Specification revision 22 section 3.5.2 NWK Information Base

#define ZB_DEFAULT_SCAN_DURATION   3

NWK: default energy/active scan duration

#define ZB_DISTRIBUTED_GLOBAL_KEY   {0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf};

In ZLL specification this is ZLL Certification pre-installed link key - see 8.7.2 Transfer ring the network key during classical Zigbee commissioning.

The distributed security global link key is used to join a distributed security network. This link key is provided to a company as a result of a successful certification of a product. For testing, this key SHALL have this default value.

See Base Device Behaviour Specification subclause 6.3.2 Distributed security global link key

#define ZB_IEEE_ADDR_TABLE_SIZE   101

NWK: size of the long-short address translation table

Note
This is a default value of the define. This value can be changed by user.
#define ZB_IO_BUF_SIZE   172

Size, in bytes, of the packet buffer

#define ZB_MAC_INDIRECT_POLL_EXPIRE_TMO   ZB_MILLISECONDS_TO_BEACON_INTERVAL(7680)

Maximum MAC packet waiting time to expire

#define ZB_N_APS_ACK_WAIT_DURATION (   _rx_on_when_idle)
Value:
((_rx_on_when_idle) ? \
#define ZB_N_APS_ACK_WAIT_DURATION_FROM_NON_SLEEPY
Definition: zb_config_common.h:275
#define ZB_N_APS_ACK_WAIT_DURATION_FROM_SLEEPY
Definition: zb_config_common.h:254

APS: Get APS ACK wait time for the device depending on its receiver on when idle

#define ZB_N_APS_ACK_WAIT_DURATION_FROM_NON_SLEEPY   (3*ZB_TIME_ONE_SECOND)

APS: APS ACK wait time from Non Sleepy devices. After this timeout resend APS packet

See Zigbee specification revision 22 section 2.2.7.1 APS Constants

#define ZB_N_APS_ACK_WAIT_DURATION_FROM_SLEEPY   (10*ZB_TIME_ONE_SECOND)

APS: APS ACK wait time from Sleepy devices. After this timeout resend APS packet see Zigbee specification revision 22 section 2.2.7.1 APS Constants

#define ZB_N_APS_BINDTRANS_ARR_MAX_SIZE   5

APS: maximum number of tables with information from a binding table to be sent to the devices

#define ZB_N_APS_BINDTRANS_DST_INDEX_ARR_MAX_SIZE   ZB_APS_DST_BINDING_TABLE_SIZE

APS: maximum number of elements in array with index from dst array in bind table

#define ZB_N_APS_KEY_PAIR_ARR_MAX_SIZE   5

APS: maximum number of tables with key-pair information

Note
This is a default value of the define. This value can be changed by user.
#define ZB_N_APS_MAX_FRAME_RETRIES   3

APS retransmissions APS maximum of apscMaxFrameRetries times

See Zigbee specification revision 22 section 2.2.7.1 APS Constants

#define ZB_N_BUF_IDS   (ZB_IOBUF_POOL_SIZE + 1)

Maximum buffer index. Buffer indexing starts from one.

#define ZB_NEIGHBOR_TABLE_SIZE   32

NWK: size of the neighbor table

Note
This is a default value of the define. This value can be changed by user.
#define ZB_NWK_LINK_STATUS_PERIOD   0xf

The time in seconds between link status command frames.

Correspond to nwkLinkStatusPeriod in Zigbee Specification revision 22 subclause 3.5.1 NWK Constants The value defined by specification.

#define ZB_NWK_REJOIN_FIRST_POLL_DELAY   (ZB_TIME_ONE_SECOND / 2)

The rejoining sleeping end-device shall not poll before the response timeout (500ms), such that the parent has enough time to process the rejoin request and put a response frame in its indirect queue (same as for association response). Depending on the implementation, once a rejoining device has performed an active scan and selected a new parent router, it sends a rejoin request (and at that time considers this router to be its new parent, otherwise it cannot accept the rejoin response), and polls for a response 500ms later.

#define ZB_NWK_REJOIN_POLL_ATTEMPTS   3

Number of poll attempts during rejoin

#define ZB_NWK_REJOIN_TIMEOUT   (ZB_TIME_ONE_SECOND * 5)

Rejoin timeout length

#define ZB_NWK_ROUTER_AGE_LIMIT   3

The number of missed link status command frames before resetting the link costs to zero.

Correspond to nwkRouterAgeLimit in Zigbee Specification revision 22 subclause 3.5.1 NWK Constants The value defined by specification.

#define ZB_NWK_ROUTING_FAILURE_ATTEMTS_NUM   1

Number of packet buffers. More buffers - more memory. Less buffers - risk to be blocked due to buffer absence.

Note
This is a default value of the define. This value can be changed by user.Should expire in this number of attemptes if failure
#define ZB_NWK_ROUTING_FAILURE_EXPIRY_STEP   (ZB_NWK_ROUTING_TABLE_EXPIRY / ZB_NWK_ROUTING_FAILURE_ATTEMTS_NUM)

Calculate routing expiry step interval based on timer initiation value and number of attempts

#define ZB_PIM_DEFAULT_FAST_POLL_INTERVAL   ZB_QUARTERECONDS_TO_BEACON_INTERVAL(2)

Default fast poll interval

#define ZB_PIM_DEFAULT_FAST_POLL_TIMEOUT   (ZB_TIME_ONE_SECOND * 10)

Default fast poll timeout

#define ZB_PIM_DEFAULT_LONG_POLL_INTERVAL   (ZB_TIME_ONE_SECOND * 5)

Default long poll interval

#define ZB_PIM_DEFAULT_MAX_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(3000)

Maximal possible turbo poll interval

#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(100)

Minimal possible turbo poll interval

#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL   ZB_MILLISECONDS_TO_BEACON_INTERVAL(100)

Default turbo poll interval

#define ZB_PIM_TURBO_POLL_LEAVE_TIMEOUT   (ZB_TIME_ONE_SECOND / 3)

Timeout for turbo poll

#define ZB_PIM_TURBO_POLL_PACKETS_TIMEOUT   (ZB_TIME_ONE_SECOND * 15)

Timeout for turbo poll

#define ZB_SECUR_N_SECUR_MATERIAL   3

Define number of network keys with the frame counter

#define ZB_SECURITY_LEVEL   5

SECUR: security level. Now fixed to be 5

#define ZB_STACK_SPEC_VERSION   22

Specification version of the specification

#define ZB_STANDARD_TC_KEY   {0x5A, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6C, 0x6C, 0x69, 0x61, 0x6E, 0x63, 0x65, 0x30, 0x39 };

Define a default global trust center link key

#define ZB_WATCHDOG_SCHED_QUANT   (20 * ZB_TIME_ONE_SECOND)

Check watchdods once per 20 sec. The hardware watchdog timer is set to 30 seconds, it should be initiated even if there is no job for it

#define ZB_ZDO_NWK_SCAN_ATTEMPTS   5

Integer value representing the number of scan attempts to make before the NWK layer decides which ZigBee coordinator or router to associate with.

See Zigbee Specification revision 22 section 2.5.51 Configuration Attribute Definitions

Table 2-154 of Zigbee Specification reviaion 22 : Config_NWK_Scan_Attempts default value is 5.

#define ZB_ZDO_NWK_TIME_BTWN_SCANS   30

Integer value representing the time duration (in milliseconds)

#define ZB_ZDO_PARENT_LINK_FAILURE_CNT   12

Number of times device failes to send packet to the parent before rejoin

#define ZB_ZDO_PENDING_LEAVE_SIZE   4

Number of pending Mgmt_Leave requests allowed


Documentation feedback | Developer Zone | Subscribe | Updated