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#

tokTypeStackKey

tokTypeStackNodeData

tokTypeStackChildTableEntry

Token types#

The types used for each stack token.

typedef uint16_t

Type for TOKEN_STACK_NVDATA_VERSION. Keeps the version number of stack tokens.

typedef uint32_t

Type for TOKEN_STACK_NONCE_COUNTER. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.

typedef uint32_t

Type for TOKEN_STACK_SECURITY_KEY_ID. Used to make sure that Nonce used for security is not repeated even after unexpected reboot.

typedef uint16_t

Type for TOKEN_STACK_LAST_ASSIGNED_ID. Stores the last assigned NodeId if the device is EMBER_STAR_COORDINATOR.

typedef uint32_t

Type for TOKEN_STACK_BOOT_COUNTER. Increments at boot (during emberInit()).

typedef EmberEUI64

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#

#define

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.


Definition at line 220 of file /mnt/raid/workspaces/ws.r4wf6JzLX/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.


Definition at line 226 of file /mnt/raid/workspaces/ws.r4wf6JzLX/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.


Definition at line 241 of file /mnt/raid/workspaces/ws.r4wf6JzLX/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.


Definition at line 272 of file /mnt/raid/workspaces/ws.r4wf6JzLX/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()).


Definition at line 278 of file /mnt/raid/workspaces/ws.r4wf6JzLX/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.


Definition at line 285 of file /mnt/raid/workspaces/ws.r4wf6JzLX/overlay/gsdk/protocol/flex/stack/config/token-stack.h

Macro Definition Documentation#

CURRENT_STACK_TOKEN_VERSION#

#define CURRENT_STACK_TOKEN_VERSION
Value:
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.


Definition at line 206 of file /mnt/raid/workspaces/ws.r4wf6JzLX/overlay/gsdk/protocol/flex/stack/config/token-stack.h