Stack Tokens#
Definitions for stack tokens.
Stack tokens are used by the stack to store information in non-volatile memory. A typical use case is to store the network information, so after an accidental reset it can be part of the network without going through the association process again.
Note
For the application tokens, refer to Token Access and AN1154.
Warnings
While stack tokens can be accessed through the Token Access API, they must not be written directly. Most stack tokens have APIs to read/write them. This documentation is intended for those who need more information on the internal details of the connect stack.
See token-stack.h for source code.
Modules#
Token types#
The types used for each stack token.
Type for TOKEN_STACK_NVDATA_VERSION. Keeps the version number of stack tokens.
Type for TOKEN_STACK_NONCE_COUNTER. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.
Type for TOKEN_STACK_SECURITY_KEY_ID. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.
Type for TOKEN_STACK_LAST_ASSIGNED_ID. Stores the last assigned NodeId if the device is EMBER_STAR_COORDINATOR.
Type for TOKEN_STACK_BOOT_COUNTER. Increments at boot (during emberInit()).
Type for TOKEN_STACK_PARENT_LONG_ID. Stores the Long Id of the parent of this device. Only used for EMBER_MAC_MODE_DEVICE and EMBER_MAC_MODE_SLEEPY_DEVICE device types.
Macros#
The current version number of the stack tokens. MSB is the version. LSB is a complement.
Token types Documentation#
tokTypeStackNvdataVersion#
typedef uint16_t tokTypeStackNvdataVersion
Type for TOKEN_STACK_NVDATA_VERSION. Keeps the version number of stack tokens.
220
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
tokTypeStackNonceCounter#
typedef uint32_t tokTypeStackNonceCounter
Type for TOKEN_STACK_NONCE_COUNTER. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.
226
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
tokTypeStackKeyID#
typedef uint32_t tokTypeStackKeyID
Type for TOKEN_STACK_SECURITY_KEY_ID. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.
241
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
tokTypeStackLastAllocatedId#
typedef uint16_t tokTypeStackLastAllocatedId
Type for TOKEN_STACK_LAST_ASSIGNED_ID. Stores the last assigned NodeId if the device is EMBER_STAR_COORDINATOR.
272
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
tokTypeStackBootCounter#
typedef uint32_t tokTypeStackBootCounter
Type for TOKEN_STACK_BOOT_COUNTER. Increments at boot (during emberInit()).
278
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
tokTypeParentLongId#
typedef EmberEUI64 tokTypeParentLongId
Type for TOKEN_STACK_PARENT_LONG_ID. Stores the Long Id of the parent of this device. Only used for EMBER_MAC_MODE_DEVICE and EMBER_MAC_MODE_SLEEPY_DEVICE device types.
285
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h
Macro Definition Documentation#
CURRENT_STACK_TOKEN_VERSION#
#define CURRENT_STACK_TOKEN_VERSIONValue:
0x03FC
The current version number of the stack tokens. MSB is the version. LSB is a complement.
See hal/micro/token.h for a more complete explanation.
206
of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/token-stack.h