nRF5 SDK for Thread and Zigbee v1.0.0
ZLL additions to Basic cluster.

Attributes added to Basic cluster.

#define ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID   0x4000
 "Manufacturer-specific reference to the version of the software" attribute identifier. More...
 
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEVAULT_VALUE   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 Default value for SWBuildId attribute. More...
 

ZLL Basic cluster additions internals.

Internal structures for attribute representation in cluster additions.

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID(data_ptr)
 
#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_ZLL(attr_list,zcl_version,app_version,stack_version,hardware_version,manufacturer_name,model_id,date_code,power_source,sw_build_id)
 Declare attribute list for Basic cluster with ZLL additions. More...
 

Detailed Description

ZLL additions to Basic cluster.

Extended Basic cluster for Light Link (see spec 6.6.1).

Example
Declare cluster:
/* Basic cluster attributes data */
zb_uint8_t g_attr_zcl_version = ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE;
zb_uint8_t g_attr_app_version = 0;
zb_uint8_t g_attr_stack_version = 0;
zb_uint8_t g_attr_hardware_version = 0;
zb_char_t g_attr_manufacturer_name[] = "\x15" "Test manufacture name";
zb_char_t g_attr_model_id[] = "\x03" "1.0";
zb_char_t g_attr_date_code[] = "\x0a" "20130509GP";
zb_uint8_t g_attr_power_source = ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE;
zb_char_t g_attr_sw_build_id[] = "\x0f" "111.111.111.111";
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_ZLL(basic_attr_list, &g_attr_zcl_version, &g_attr_app_version,
&g_attr_stack_version, &g_attr_hardware_version, &g_attr_manufacturer_name, &g_attr_model_id,
&g_attr_date_code, &g_attr_power_source, &g_attr_sw_build_id);
Read attribute Vestion ID command sending: Process response:
if (read_attr_resp->attr_id!=ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID)
{
g_error_cnt++;
TRACE_MSG(TRACE_ERROR, "ERROR attrId 0x%x", (FMT__D, read_attr_resp->attr_id));
}
break;

Other commands can be sent in the same way using appropriate macros.

For more information tp_cst_06 test

Macro Definition Documentation

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID (   data_ptr)
Value:
{ \
ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID, \
ZB_ZCL_ATTR_TYPE_CHAR_STRING, \
ZB_ZCL_ATTR_ACCESS_READ_ONLY, \
(zb_voidp_t) data_ptr \
}
#define ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID   0x4000

"Manufacturer-specific reference to the version of the software" attribute identifier.

See Also
ZLL specification, subclause 6.2.1.1.
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEVAULT_VALUE   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Default value for SWBuildId attribute.

See Also
ZLL specification, subclause 6.2.1.1.
Note
Default value supposes that attribute will be stored as Pascal-style string (i. e. length-byte, then content).
#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_ZLL (   attr_list,
  zcl_version,
  app_version,
  stack_version,
  hardware_version,
  manufacturer_name,
  model_id,
  date_code,
  power_source,
  sw_build_id 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID, (zcl_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID, (app_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID, (stack_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_HW_VERSION_ID, (hardware_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID, (manufacturer_name))\
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID, (model_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DATE_CODE_ID, (date_code)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID, (power_source)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_SW_BUILD_ID_ZLL_ID, (sw_build_id)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Basic cluster with ZLL additions.

Parameters
attr_list[IN] - attribure list name.
zcl_version[IN] - pointer to variable storing ZCL version attribute value.
app_version[IN] - pointer to the variable storing application version.
stack_version[IN] - pointer to the variable storing stack version.
hardware_version[IN] - pointer to the variable storing hardware version.
manufacturer_name[IN] - pointer to the variable storing manufacturer name.
model_id[IN] - pointer to the variable storing model identifier.
date_code[IN] - pointer to the variable storing date code.
power_source[IN] - pointer to variable storing power source attribute value.
sw_build_id[IN] - pointer to the variable storing software version reference.

Documentation feedback | Developer Zone | Subscribe | Updated