Appendix C: Extended attribute discovery

‘Extended’ attribute discovery is similar to the normal attribute discovery described in Section 2.3.4 except the accessibility of each attribute is additionally indicated as being ‘read’, ‘write’ or ‘reportable’. The application coding details and compile-time options are different, and are described below.

Appendix C.1: Compile-time options

If required, the extended attribute discovery feature must be explicitly enabled on the cluster server and client at compile-time by respectively including the following defines in the zcl_options.h files:

#define ZCL_ATTRIBUTE_DISCOVERY_EXTENDED_SERVER_SUPPORTED
#define ZCL_ATTRIBUTE_DISCOVERY_EXTENDED_CLIENT_SUPPORTED

Parent topic:Appendix C: Extended attribute discovery

Appendix C.2: Application coding

The application on a cluster client can initiate an extended attribute discovery on the cluster server by calling the eZCL_SendDiscoverAttributesExtendedRequest() function, which sends a ‘discover attributes extended’ request to the server. This function allows a range of attributes to be searched for, defined by:

  • The ‘start’ attribute in the range (the attribute identifier must be specified).

  • The number of attributes in the range.

Initially, the start attribute should be set to the first attribute of the cluster. If the discovery request does not return all the attributes used on the cluster server, the above function should be called again with the start attribute set to the next ‘undiscovered’ attribute. Multiple function calls may be required to discover all of the attributes used on the server.

On receiving a discover attributes extended request, the server handles the request automatically (provided that extended attribute discovery has been enabled in the compile-time options - see above) and replies with a ‘discover attributes extended’ response containing the requested information.

The arrival of the response at the client results in the event E_ZCL_CBET_DISCOVER_INDIVIDUAL_ATTRIBUTE_EXTENDED_RESPONSE for each attribute reported in the response. Therefore, multiple events normally result from a single discover attributes extended request. This event contains details of the reported attribute in a tsZCL_AttributeDiscoveryExtendedResponse structure (see Section 6.1.11).

Following the event for the final attribute reported, the event E_ZCL_CBET_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE is generated to indicate that all attributes from the discover attributes extended response have been reported.

Parent topic:Appendix C: Extended attribute discovery