Other Parts Discussed in Thread: SYSCONFIG, Z-STACK
Hello,
I'm using zed_sampleapp as the basis for a custom zed application using simplelink_cc13x2_26x2_sdk_4_40_00_44 with sysconfig_1.7.0. I modified zed_sampleapp.syscfg my purposes and generated the associated code. Below is a snippet from zcl_config.c.
/*********************************************************************
* ZCL Attribute List
*********************************************************************/
// NOTE: The attributes listed in the AttrRec must be in ascending order
// per cluster to allow right function of the Foundation discovery commands
const zclAttrRec_t sampleApp_Attrs[] =
{
#ifdef ZCL_BASIC
{
ZCL_CLUSTER_ID_GENERAL_BASIC,
{
ATTRID_BASIC_ZCL_VERSION ,
ZCL_DATATYPE_UINT8,
ACCESS_CONTROL_READ,
(void *)&sampleApp_Basic_ZCLVersion
}
},
{
ZCL_CLUSTER_ID_GENERAL_BASIC,
{
ATTRID_BASIC_POWER_SOURCE ,
ZCL_DATATYPE_ENUM8,
ACCESS_CONTROL_READ,
(void *)&sampleApp_Basic_PowerSource
}
},
{
ZCL_CLUSTER_ID_GENERAL_BASIC,
{
ATTRID_CLUSTER_REVISION,
ZCL_DATATYPE_UINT16,
ACCESS_CONTROL_READ,
(void *)&sampleApp_Basic_ClusterRevision
}
},
{
ZCL_CLUSTER_ID_GENERAL_BASIC,
{
ATTRID_BASIC_MANUFACTURER_NAME ,
ZCL_DATATYPE_CHAR_STR,
ACCESS_CONTROL_READ,
(void *)&sampleApp_Basic_ManufacturerName
}
},
{
ZCL_CLUSTER_ID_GENERAL_BASIC,
{
ATTRID_BASIC_MODEL_IDENTIFIER ,
ZCL_DATATYPE_CHAR_STR,
ACCESS_CONTROL_READ,
(void *)&sampleApp_Basic_ModelIdentifier
}
},...
So, the attribute ID order for the generated is:
ZCL_CLUSTER_ID_GENERAL_BASIC -
ATTRID_BASIC_ZCL_VERSION (0x000)
ATTRID_BASIC_POWER_SOURCE (0x0007)
ATTRID_CLUSTER_REVISION (0xFFFD)
ATTRID_BASIC_MANUFACTURER_NAME (0x0004)
ATTRID_BASIC_MODEL_IDENTIFIER (0x0005)
Per the comment at the beginning of the generated code the attributes need to be in ascending order, however, the generated code is not, which seems odd, so here are my questions:
Is the comment no longer accurate and unnecessary?
Is this a known issue with the zigbee application builder?
Are there nuances with application builder that cause this behavior that users should be aware of?
FYI - other cluster attributes in the generated code were also not in ascending order.
Thank you for your help.
Gene