ZCL_ReadAttributeValue Function

C

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

Finds an attribute in ZCL and returns its valu

The function may be used 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.

Parameters

ParamDescription
endpointIdendpoint on which cluster is registered
clusterIdcluster unique identifier
clusterSidedetects the cluster's side (client or server)
attrIdattribute unique identifier
attrTypepointer to attribute type determined and returned
attrValueread out attribute value pointer Caller is responsible for providing big enough attrValue buffer.

Returns

The status of the operation: ::ZCL_SUCCESS_STATUS (0x00) - attribute value has been obtained successfully

::ZCL_UNSUPPORTED_ATTRIBUTE_STATUS (0x86) - the specified attribute is not supported