Skip to main content
Associate II
Mar 5, 2024 10:22 AM UTC
Question

In Custom Clusters, is it possible to define an attribute that stores a variable-length string?

 

Hi there,

In Custom Clusters, I'm exploring the option of defining an attribute capable of storing a string with a variable length. I need some information on below parameter 'customValSz':

// structure ZbZclAttrT from zcl.h

 unsigned int customValSz;
 /**< A custom size is required if the data type is one of:
 * ZCL_DATATYPE_STRING_OCTET,
 * ZCL_DATATYPE_STRING_CHARACTER,
 * ZCL_DATATYPE_STRING_LONG_OCTET,
 * ZCL_DATATYPE_STRING_LONG_CHARACTER,
 * ZCL_DATATYPE_ARRAY,
 * ZCL_DATATYPE_STRUCT,
 * ZCL_DATATYPE_SET,
 * ZCL_DATATYPE_BAG
 *
 * A custom size is also required if both customRead and customWrite callbacks
 * are provided and ZCL_ATTR_FLAG_PERSISTABLE is set.
 *
 * The maximum size is the length returned by ZbZclClusterGetMaxAsduLength() or
 * the cluster's maxAsduLength parameter. It should not exceed
 * ZB_APS_CONST_MAX_FRAG_SIZE. */

It is evident from the information above that we can send a maximum of ZB_APS_CONST_MAX_FRAG_SIZE, which is 2000 bytes. Please confirm if my understanding is correct, and any suggestions are welcome.

Question: Can I create an attribute for variable string or for fixed size string with 512 bytes within custom cluster?

 

--

Thanks
Naani Ch

 

This topic has been closed for replies.

1 reply

Billy OWEN
ST Employee
Mar 5, 2024 5:04 PM UTC

Hi @naanichilakalapudi 

 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

 

Regards,

Billy