Ember data type definitions.

See Ember ZigBee Light Link (ZLL) Data Types for details.

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_ZLL_TYPES_H
#define SILABS_ZLL_TYPES_H

#include "stack/include/sl_zigbee_types.h"


#define SL_ZIGBEE_ZLL_PRIMARY_CHANNEL_MASK ((uint32_t)(BIT32(11)   \
                                                       | BIT32(15) \
                                                       | BIT32(20) \
                                                       | BIT32(25)))

#define SL_ZIGBEE_ZLL_SECONDARY_CHANNEL_MASK ((uint32_t)(BIT32(12)   \
                                                         | BIT32(13) \
                                                         | BIT32(14) \
                                                         | BIT32(16) \
                                                         | BIT32(17) \
                                                         | BIT32(18) \
                                                         | BIT32(19) \
                                                         | BIT32(21) \
                                                         | BIT32(22) \
                                                         | BIT32(23) \
                                                         | BIT32(24) \
                                                         | BIT32(26)))

#define SL_ZIGBEE_ZLL_NULL_NODE_ID 0x0000

#define SL_ZIGBEE_ZLL_MIN_NODE_ID 0x0001

#define SL_ZIGBEE_ZLL_MAX_NODE_ID 0xFFF7

#define SL_ZIGBEE_ZLL_NULL_GROUP_ID 0x0000

#define SL_ZIGBEE_ZLL_MIN_GROUP_ID 0x0001

#define SL_ZIGBEE_ZLL_MAX_GROUP_ID 0xFEFF

#ifdef DOXYGEN_SHOULD_SKIP_THIS
enum sl_zigbee_zll_state_t
#else
typedef uint16_t sl_zigbee_zll_state_t;
enum
#endif
{
  SL_ZIGBEE_ZLL_STATE_NONE                       = 0x0000,
  SL_ZIGBEE_ZLL_STATE_FACTORY_NEW                = 0x0001,
  SL_ZIGBEE_ZLL_STATE_ADDRESS_ASSIGNMENT_CAPABLE = 0x0002,
  SL_ZIGBEE_ZLL_STATE_LINK_INITIATOR             = 0x0010,
  SL_ZIGBEE_ZLL_STATE_LINK_PRIORITY_REQUEST      = 0x0020,
  SL_ZIGBEE_ZLL_STATE_PROFILE_INTEROP            = 0x0080,
  SL_ZIGBEE_ZLL_STATE_NON_ZLL_NETWORK            = 0x0100,
  SL_ZIGBEE_ZLL_TOKEN_POINTS_TO_PSA_ID           = 0x0200,
};

typedef struct {
  uint32_t transactionId;
  uint32_t responseId;
  uint16_t bitmask;
} sl_zigbee_zll_security_algorithm_data_t;

typedef struct {
  sl_zigbee_zigbee_network_t zigbeeNetwork;
  sl_zigbee_zll_security_algorithm_data_t securityAlgorithm;
  sl_802154_long_addr_t eui64;
  sl_802154_short_addr_t nodeId;
  sl_zigbee_zll_state_t state;
  sl_zigbee_node_type_t nodeType;
  uint8_t numberSubDevices;
  uint8_t totalGroupIdentifiers;
  uint8_t rssiCorrection;
} sl_zigbee_zll_network_t;

typedef struct {
  sl_802154_long_addr_t ieeeAddress;
  uint8_t endpointId;
  uint16_t profileId;
  uint16_t deviceId;
  uint8_t version;
  uint8_t groupIdCount;
} sl_zigbee_zll_device_info_record_t;

typedef struct {
  sl_802154_short_addr_t nodeId;
  sl_802154_short_addr_t freeNodeIdMin;
  sl_802154_short_addr_t freeNodeIdMax;
  sl_zigbee_multicast_id_t groupIdMin;
  sl_zigbee_multicast_id_t groupIdMax;
  sl_zigbee_multicast_id_t freeGroupIdMin;
  sl_zigbee_multicast_id_t freeGroupIdMax;
} sl_zigbee_zll_address_assignment_t;

#define SL_ZIGBEE_ZLL_CLUSTER_ID 0x1000

#define SL_ZIGBEE_ZLL_PROFILE_ID 0xC05E

#ifdef DOXYGEN_SHOULD_SKIP_THIS
enum sl_zigbee_zll_key_index_t
#else
typedef uint8_t sl_zigbee_zll_key_index_t;
enum
#endif
{
  SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT   = 0x00,
  SL_ZIGBEE_ZLL_KEY_INDEX_MASTER        = 0x04,
  SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION = 0x0F,
};

#define SL_ZIGBEE_ZLL_KEY_MASK_DEVELOPMENT (1 << SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT)

#define SL_ZIGBEE_ZLL_KEY_MASK_MASTER (1 << SL_ZIGBEE_ZLL_KEY_INDEX_MASTER)

#define SL_ZIGBEE_ZLL_KEY_MASK_CERTIFICATION (1 << SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION)

#define SL_ZIGBEE_ZLL_CERTIFICATION_ENCRYPTION_KEY  \
  { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, \
    0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF }

#define SL_ZIGBEE_ZLL_CERTIFICATION_PRECONFIGURED_LINK_KEY \
  { 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,        \
    0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF }

typedef struct {
  uint32_t bitmask;
  sl_zigbee_zll_key_index_t keyIndex;
  sl_zigbee_key_data_t encryptionKey;
  sl_zigbee_key_data_t preconfiguredKey;
} sl_zigbee_zll_initial_security_state_t;

#ifdef DOXYGEN_SHOULD_SKIP_THIS
enum sl_zigbee_zll_policy_t
#else
typedef uint8_t sl_zigbee_zll_policy_t;
enum
#endif
{
  SL_ZIGBEE_ZLL_POLICY_DISABLED = 0x00,
  SL_ZIGBEE_ZLL_POLICY_ENABLED = 0x01,
  SL_ZIGBEE_ZLL_POLICY_TARGET = 0x02,
  SL_ZIGBEE_ZLL_POLICY_STEALING_ENABLED = 0x04,
  SL_ZIGBEE_ZLL_POLICY_REMOTE_RESET_ENABLED = 0x08,
};


typedef struct {
  uint32_t bitmask;
  uint16_t freeNodeIdMin;
  uint16_t freeNodeIdMax;
  uint16_t myGroupIdMin;
  uint16_t freeGroupIdMin;
  uint16_t freeGroupIdMax;
  uint8_t rssiCorrection;
} sl_zigbee_tok_type_stack_zll_data_t;

typedef struct {
  uint32_t bitmask;
  uint8_t keyIndex;
  uint8_t encryptionKey[SL_ZIGBEE_ENCRYPTION_KEY_SIZE];
  uint8_t preconfiguredKey[SL_ZIGBEE_ENCRYPTION_KEY_SIZE];
} sl_zigbee_tok_type_stack_zll_security_t;

#endif // SILABS_ZLL_TYPES_H

Modules#

sl_zigbee_zll_security_algorithm_data_t

sl_zigbee_zll_network_t

sl_zigbee_zll_device_info_record_t

sl_zigbee_zll_address_assignment_t

sl_zigbee_zll_initial_security_state_t

sl_zigbee_tok_type_stack_zll_data_t

sl_zigbee_tok_type_stack_zll_security_t

ZigBee Light Link Types#

#define

The list of primary ZLL channels.

#define

The list of secondary ZLL channels.

#define

A distinguished network identifier in the ZLL network address space that indicates no free network identifiers were assigned to the device.

#define

The minimum network identifier in the ZLL network address space.

#define

The maximum network identifier in the ZLL network address space.

#define

A distinguished group identifier in the ZLL group address space that indicates no free group identifiers were assigned to the device.

#define

The minimum group identifier in the ZLL group address space.

#define

The maximum group identifier in the ZLL group address space.

#define

The ZigBee Light Link Commissioning cluster ID.

#define

The ZigBee Light Link Profile ID.

#define
SL_ZIGBEE_ZLL_KEY_MASK_DEVELOPMENT (1 << SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT)

The key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT.

#define
SL_ZIGBEE_ZLL_KEY_MASK_MASTER (1 << SL_ZIGBEE_ZLL_KEY_INDEX_MASTER)

The key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_MASTER.

#define
SL_ZIGBEE_ZLL_KEY_MASK_CERTIFICATION (1 << SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION)

THe key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.

#define

The encryption key for use during development and certification in conjunction with SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.

#define

The pre-configured link key for use during development and certification in conjunction with SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.

enum
SL_ZIGBEE_ZLL_STATE_NONE = 0x0000
SL_ZIGBEE_ZLL_STATE_FACTORY_NEW = 0x0001
SL_ZIGBEE_ZLL_STATE_ADDRESS_ASSIGNMENT_CAPABLE = 0x0002
SL_ZIGBEE_ZLL_STATE_LINK_INITIATOR = 0x0010
SL_ZIGBEE_ZLL_STATE_LINK_PRIORITY_REQUEST = 0x0020
SL_ZIGBEE_ZLL_STATE_PROFILE_INTEROP = 0x0080
SL_ZIGBEE_ZLL_STATE_NON_ZLL_NETWORK = 0x0100
SL_ZIGBEE_ZLL_TOKEN_POINTS_TO_PSA_ID = 0x0200
}

A bitmask indicating the state of the ZLL device. This maps directly to the ZLL information field in the scan response.

enum
SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT = 0x00
SL_ZIGBEE_ZLL_KEY_INDEX_MASTER = 0x04
SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION = 0x0F
}

The key encryption algorithms supported by the stack.

enum
SL_ZIGBEE_ZLL_POLICY_DISABLED = 0x00
SL_ZIGBEE_ZLL_POLICY_ENABLED = 0x01
SL_ZIGBEE_ZLL_POLICY_TARGET = 0x02
SL_ZIGBEE_ZLL_POLICY_STEALING_ENABLED = 0x04
SL_ZIGBEE_ZLL_POLICY_REMOTE_RESET_ENABLED = 0x08
}

This enumeration indicates whether or not the stack processes ZLL messages.

ZigBee Light Link Types Documentation#

SL_ZIGBEE_ZLL_PRIMARY_CHANNEL_MASK#

#define SL_ZIGBEE_ZLL_PRIMARY_CHANNEL_MASK
Value:
((uint32_t)(BIT32(11) \
| BIT32(15) \
| BIT32(20) \
| BIT32(25)))

The list of primary ZLL channels.


Definition at line 40 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_SECONDARY_CHANNEL_MASK#

#define SL_ZIGBEE_ZLL_SECONDARY_CHANNEL_MASK
Value:
((uint32_t)(BIT32(12) \
| BIT32(13) \
| BIT32(14) \
| BIT32(16) \
| BIT32(17) \
| BIT32(18) \
| BIT32(19) \
| BIT32(21) \
| BIT32(22) \
| BIT32(23) \
| BIT32(24) \
| BIT32(26)))

The list of secondary ZLL channels.


Definition at line 48 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_NULL_NODE_ID#

#define SL_ZIGBEE_ZLL_NULL_NODE_ID
Value:
0x0000

A distinguished network identifier in the ZLL network address space that indicates no free network identifiers were assigned to the device.


Definition at line 65 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_MIN_NODE_ID#

#define SL_ZIGBEE_ZLL_MIN_NODE_ID
Value:
0x0001

The minimum network identifier in the ZLL network address space.


Definition at line 70 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_MAX_NODE_ID#

#define SL_ZIGBEE_ZLL_MAX_NODE_ID
Value:
0xFFF7

The maximum network identifier in the ZLL network address space.


Definition at line 75 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_NULL_GROUP_ID#

#define SL_ZIGBEE_ZLL_NULL_GROUP_ID
Value:
0x0000

A distinguished group identifier in the ZLL group address space that indicates no free group identifiers were assigned to the device.


Definition at line 81 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_MIN_GROUP_ID#

#define SL_ZIGBEE_ZLL_MIN_GROUP_ID
Value:
0x0001

The minimum group identifier in the ZLL group address space.


Definition at line 86 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_MAX_GROUP_ID#

#define SL_ZIGBEE_ZLL_MAX_GROUP_ID
Value:
0xFEFF

The maximum group identifier in the ZLL group address space.


Definition at line 91 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_CLUSTER_ID#

#define SL_ZIGBEE_ZLL_CLUSTER_ID
Value:
0x1000

The ZigBee Light Link Commissioning cluster ID.


Definition at line 177 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_PROFILE_ID#

#define SL_ZIGBEE_ZLL_PROFILE_ID
Value:
0xC05E

The ZigBee Light Link Profile ID.


Definition at line 182 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_KEY_MASK_DEVELOPMENT#

#define SL_ZIGBEE_ZLL_KEY_MASK_DEVELOPMENT
Value:
(1 << SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT)

The key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT.


Definition at line 206 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_KEY_MASK_MASTER#

#define SL_ZIGBEE_ZLL_KEY_MASK_MASTER
Value:
(1 << SL_ZIGBEE_ZLL_KEY_INDEX_MASTER)

The key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_MASTER.


Definition at line 212 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_KEY_MASK_CERTIFICATION#

#define SL_ZIGBEE_ZLL_KEY_MASK_CERTIFICATION
Value:
(1 << SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION)

THe key encryption bitmask corresponding to encryption key index SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.


Definition at line 218 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_CERTIFICATION_ENCRYPTION_KEY#

#define SL_ZIGBEE_ZLL_CERTIFICATION_ENCRYPTION_KEY
Value:
{ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, \
0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF }

The encryption key for use during development and certification in conjunction with SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.


Definition at line 224 of file stack/include/zll-types.h

SL_ZIGBEE_ZLL_CERTIFICATION_PRECONFIGURED_LINK_KEY#

#define SL_ZIGBEE_ZLL_CERTIFICATION_PRECONFIGURED_LINK_KEY
Value:
{ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, \
0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF }

The pre-configured link key for use during development and certification in conjunction with SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION.


Definition at line 232 of file stack/include/zll-types.h

sl_zigbee_zll_state_t#

sl_zigbee_zll_state_t

A bitmask indicating the state of the ZLL device. This maps directly to the ZLL information field in the scan response.

Enumerator
SL_ZIGBEE_ZLL_STATE_NONE

No state.

SL_ZIGBEE_ZLL_STATE_FACTORY_NEW

The device is factory new.

SL_ZIGBEE_ZLL_STATE_ADDRESS_ASSIGNMENT_CAPABLE

The device is capable of assigning addresses to other devices.

SL_ZIGBEE_ZLL_STATE_LINK_INITIATOR

The device is initiating a link operation.

SL_ZIGBEE_ZLL_STATE_LINK_PRIORITY_REQUEST

The device is requesting link priority.

SL_ZIGBEE_ZLL_STATE_PROFILE_INTEROP

The device is a ZigBee 3.0 device.

SL_ZIGBEE_ZLL_STATE_NON_ZLL_NETWORK

The device is on a non-ZLL network.

SL_ZIGBEE_ZLL_TOKEN_POINTS_TO_PSA_ID

Internal use: the ZLL token's key values point to a PSA key identifier


Definition at line 98 of file stack/include/zll-types.h

sl_zigbee_zll_key_index_t#

sl_zigbee_zll_key_index_t

The key encryption algorithms supported by the stack.

Enumerator
SL_ZIGBEE_ZLL_KEY_INDEX_DEVELOPMENT

The key encryption algorithm for use during development.

SL_ZIGBEE_ZLL_KEY_INDEX_MASTER

The key encryption algorithm shared by all certified devices.

SL_ZIGBEE_ZLL_KEY_INDEX_CERTIFICATION

The key encryption algorithm for use during development and certification.


Definition at line 188 of file stack/include/zll-types.h

sl_zigbee_zll_policy_t#

sl_zigbee_zll_policy_t

This enumeration indicates whether or not the stack processes ZLL messages.

Enumerator
SL_ZIGBEE_ZLL_POLICY_DISABLED

Initial state - all touchlinking is disabled.

SL_ZIGBEE_ZLL_POLICY_ENABLED

Indicates that ZLL processing is enabled.

SL_ZIGBEE_ZLL_POLICY_TARGET

Indicates that ZLL target is enabled.

SL_ZIGBEE_ZLL_POLICY_STEALING_ENABLED

Indicates that stealing and network update are enabled for non factory new devices.

SL_ZIGBEE_ZLL_POLICY_REMOTE_RESET_ENABLED

Indicates that remote reset is enabled for non factory new devices.


Definition at line 255 of file stack/include/zll-types.h