5.1.7.3.8 ZCL_ReadAttributeValue Function

Syntax

ZCL_Status_t ZCL_ReadAttributeValue(Endpoint_t endpointId, ClusterId_t clusterId,uint8_t clusterSide,  ZCL_AttributeId_t attrId, uint8_t *attrType, uint8_t *attrValue);

Description

This function finds an attribute in ZCL and returns its value.

The user can use this function to obtain only local attributes. To access an attribute on a remote device, send a read attributes general cluster command via the ZCL_AttributeReq() function.

Input Parameters
Parameter NameDescription
endpointIdEndpoint where the cluster is registered
clusterIdCluster unique identifier
clusterSideDetects the cluster’s side (client or server)
attrIdAttribute unique identifier
attrTypePointer to attribute type determined and returned
attrValue
  • Read out attribute value pointer
  • Caller is responsible for providing required attribute value buffer
Return Type and Values
  • The status of the operation:
    • ZCL_SUCCESS_STATUS (0x00) – Attribute value is obtained successfully
    • ZCL_UNSUPPORTED_ATTRIBUTE_STATUS (0x86) – Does not support the specified attribute