cancel
Showing results for 
Search instead for 
Did you mean: 

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

naanichilakalapudi
Associate III

 

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

 

1 REPLY 1
Billy OWEN
ST Employee

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