Stack Tokens#

These tokens are divided into three sections (the three main types of tokens mentioned in token.h):

  • manufacturing

  • stack

  • application

For a full explanation of the tokens, see hal/micro/token.h. See token-stack.h for source code.

A set of tokens is predefined in the APPLICATION DATA section at the end of token-stack.h because these tokens are required by the stack, but they are classified as application tokens since they are sized by the application via its CONFIGURATION_HEADER.

The user application can include its own tokens in a header file similar to this one. The macro ::APPLICATION_TOKEN_HEADER should be defined to equal the name of the header file in which application tokens are defined. See the APPLICATION DATA section at the end of token-stack.h for examples of token definitions.

Since token-stack.h contains both the typedefs and the token defs, two #defines are used to select which one is needed when this file is included. #define DEFINETYPES is used to select the type definitions and #define DEFINETOKENS is used to select the token definitions. See token.h and token.c to see how these are used.

Convenience Macros#

The following convenience macros are used to simplify the definition process for commonly specified parameters to the basic TOKEN_DEF macro. See hal/micro/token.h for a more complete explanation.

#define
DEFINE_BASIC_TOKEN (name, type, ...)
#define
DEFINE_COUNTER_TOKEN (name, type, ...)
#define
DEFINE_INDEXED_TOKEN (name, type, arraysize, ...)
#define
DEFINE_FIXED_BASIC_TOKEN (name, type, address, ...)
#define
DEFINE_FIXED_COUNTER_TOKEN (name, type, address, ...)
#define
DEFINE_FIXED_INDEXED_TOKEN (name, type, arraysize, address, ...)
#define
DEFINE_MFG_TOKEN (name, type, address, ...)

Creator Codes#

The CREATOR is used as a distinct identifier tag for the token.The CREATOR is necessary because the token name is defined differently depending on the hardware platform. Therefore, the CREATOR ensures that token definitions and data stay tagged and known. The only requirement is that each creator definition must be unique. See hal/micro/token.h for a more complete explanation.

#define
CREATOR_STACK_NVDATA_VERSION 0xFF01
#define
CREATOR_STACK_BOOT_COUNTER 0xE263
#define
CREATOR_STACK_NONCE_COUNTER 0xE563
#define
CREATOR_STACK_ANALYSIS_REBOOT 0xE162
#define
CREATOR_STACK_KEYS 0xEB79
#define
CREATOR_STACK_NODE_DATA 0xEE64
#define
CREATOR_STACK_CLASSIC_DATA 0xE364
#define
CREATOR_STACK_ALTERNATE_KEY 0xE475
#define
CREATOR_STACK_APS_FRAME_COUNTER 0xE123
#define
CREATOR_STACK_TRUST_CENTER 0xE124
#define
CREATOR_STACK_NETWORK_MANAGEMENT 0xE125
#define
CREATOR_STACK_PARENT_INFO 0xE126
#define
CREATOR_STACK_PARENT_ADDITIONAL_INFO 0xE127
#define
CREATOR_STACK_MULTI_PHY_NWK_INFO 0xE128
#define
CREATOR_STACK_MIN_RECEIVED_RSSI 0xE129
#define
CREATOR_STACK_RESTORED_EUI64 0xE12A
#define
CREATOR_MULTI_NETWORK_STACK_KEYS 0xE210
#define
CREATOR_MULTI_NETWORK_STACK_NODE_DATA 0xE211
#define
CREATOR_MULTI_NETWORK_STACK_ALTERNATE_KEY 0xE212
#define
CREATOR_MULTI_NETWORK_STACK_TRUST_CENTER 0xE213
#define
CREATOR_MULTI_NETWORK_STACK_NETWORK_MANAGEMENT 0xE214
#define
CREATOR_MULTI_NETWORK_STACK_PARENT_INFO 0xE215
#define
CREATOR_MULTI_NETWORK_STACK_NONCE_COUNTER 0xE220
#define
CREATOR_MULTI_NETWORK_STACK_PARENT_ADDITIONAL_INFO 0xE221
#define
CREATOR_STACK_GP_DATA 0xE258
#define
CREATOR_STACK_GP_PROXY_TABLE 0xE259
#define
CREATOR_STACK_GP_SINK_TABLE 0xE25A
#define
CREATOR_STACK_GP_INCOMING_FC 0xE25B
#define
CREATOR_STACK_GP_INCOMING_FC_IN_SINK 0xE25C
#define
CREATOR_STACK_BINDING_TABLE 0xE274
#define
CREATOR_STACK_CHILD_TABLE 0xFF0D
#define
CREATOR_STACK_KEY_TABLE 0xE456
#define
CREATOR_STACK_CERTIFICATE_TABLE 0xE500
#define
CREATOR_STACK_ZLL_DATA 0xE501
#define
CREATOR_STACK_ZLL_SECURITY 0xE502
#define
CREATOR_STACK_ADDITIONAL_CHILD_DATA 0xE503

NVM3 Object Keys#

The NVM3 object key is used as a distinct identifier tag for a token stored in NVM3.Every token must have a defined NVM3 object key and the object key must be unique. The object key defined must be in the following format: NVM3KEY_tokennamewhere tokenname is the name of the token without NVM3KEY_ or TOKEN_ prefix.

#define
NVM3KEY_DOMAIN_USER 0x00000U
#define
NVM3KEY_DOMAIN_ZIGBEE 0x10000U
#define
NVM3KEY_DOMAIN_COMMON 0x80000U
#define
NVM3KEY_STACK_NVDATA_VERSION (NVM3KEY_DOMAIN_ZIGBEE | 0xFF01)
#define
NVM3KEY_STACK_BOOT_COUNTER (NVM3KEY_DOMAIN_ZIGBEE | 0xE263)
#define
NVM3KEY_STACK_NONCE_COUNTER (NVM3KEY_DOMAIN_ZIGBEE | 0xE563)
#define
NVM3KEY_STACK_ANALYSIS_REBOOT (NVM3KEY_DOMAIN_ZIGBEE | 0xE162)
#define
NVM3KEY_STACK_KEYS (NVM3KEY_DOMAIN_ZIGBEE | 0xEB79)
#define
NVM3KEY_STACK_NODE_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0xEE64)
#define
NVM3KEY_STACK_CLASSIC_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0xE364)
#define
NVM3KEY_STACK_ALTERNATE_KEY (NVM3KEY_DOMAIN_ZIGBEE | 0xE475)
#define
NVM3KEY_STACK_APS_FRAME_COUNTER (NVM3KEY_DOMAIN_ZIGBEE | 0xE123)
#define
NVM3KEY_STACK_TRUST_CENTER (NVM3KEY_DOMAIN_ZIGBEE | 0xE124)
#define
NVM3KEY_STACK_NETWORK_MANAGEMENT (NVM3KEY_DOMAIN_ZIGBEE | 0xE125)
#define
NVM3KEY_STACK_PARENT_INFO (NVM3KEY_DOMAIN_ZIGBEE | 0xE126)
#define
NVM3KEY_STACK_PARENT_ADDITIONAL_INFO (NVM3KEY_DOMAIN_ZIGBEE | 0xE127)
#define
NVM3KEY_STACK_MULTI_PHY_NWK_INFO (NVM3KEY_DOMAIN_ZIGBEE | 0xE128)
#define
NVM3KEY_STACK_MIN_RECEIVED_RSSI (NVM3KEY_DOMAIN_ZIGBEE | 0xE129)
#define
NVM3KEY_STACK_RESTORED_EUI64 (NVM3KEY_DOMAIN_ZIGBEE | 0xE12A)
#define
NVM3KEY_MULTI_NETWORK_STACK_KEYS (NVM3KEY_DOMAIN_ZIGBEE | 0x0000)
#define
NVM3KEY_MULTI_NETWORK_STACK_NODE_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0x0080)
#define
NVM3KEY_MULTI_NETWORK_STACK_ALTERNATE_KEY (NVM3KEY_DOMAIN_ZIGBEE | 0x0100)
#define
NVM3KEY_MULTI_NETWORK_STACK_TRUST_CENTER (NVM3KEY_DOMAIN_ZIGBEE | 0x0180)
#define
NVM3KEY_MULTI_NETWORK_STACK_NETWORK_MANAGEMENT (NVM3KEY_DOMAIN_ZIGBEE | 0x0200)
#define
NVM3KEY_MULTI_NETWORK_STACK_PARENT_INFO (NVM3KEY_DOMAIN_ZIGBEE | 0x0280)
#define
NVM3KEY_MULTI_NETWORK_STACK_NONCE_COUNTER (NVM3KEY_DOMAIN_ZIGBEE | 0xE220)
#define
NVM3KEY_MULTI_NETWORK_STACK_PARENT_ADDITIONAL_INFO (NVM3KEY_DOMAIN_ZIGBEE | 0x0300)
#define
NVM3KEY_STACK_GP_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0xE258)
#define
NVM3KEY_STACK_GP_PROXY_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0380)
#define
NVM3KEY_STACK_GP_SINK_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0400)
#define
NVM3KEY_STACK_GP_INCOMING_FC (NVM3KEY_DOMAIN_ZIGBEE | 0x0480)
#define
NVM3KEY_STACK_BINDING_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0500)
#define
NVM3KEY_STACK_CHILD_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0580)
#define
NVM3KEY_STACK_KEY_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0600)
#define
NVM3KEY_STACK_CERTIFICATE_TABLE (NVM3KEY_DOMAIN_ZIGBEE | 0x0680)
#define
NVM3KEY_STACK_ZLL_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0xE501)
#define
NVM3KEY_STACK_ZLL_SECURITY (NVM3KEY_DOMAIN_ZIGBEE | 0xE502)
#define
NVM3KEY_STACK_ADDITIONAL_CHILD_DATA (NVM3KEY_DOMAIN_ZIGBEE | 0x0700)
#define
NVM3KEY_STACK_GP_INCOMING_FC_IN_SINK (NVM3KEY_DOMAIN_ZIGBEE | 0x0780)

Macros#

#define
TOKEN_NEXT_ADDRESS (region, address)

By default, tokens are automatically located after the previous token.

#define
CURRENT_STACK_TOKEN_VERSION 0x03FC

The current version number of the stack tokens. MSB is the version, LSB is a complement.

#define
STACK_KEYS_DEFAULT_VALUE { { 0, } }
#define
STACK_ALT_NWK_KEY_DEFAULT_VALUE { { 0, } }
#define
ZLL_TOKENS_PRESENT

Convenience Macros Documentation#

Creator Codes Documentation#

NVM3 Object Keys Documentation#