ZCL Core Callbacks
Detailed Description
These callbacks are contributed by the ZCL Core plugin.
Function Documentation
void emberZclGetDefaultReportableChangeCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
Get the default reportable change for an attribute.
- Parameters
-
endpointId
The endpoint to which the reportable change applies clusterSpec
The cluster to which the reportable change applies attributeId
The attribute ID buffer
The data buffer to populate with the reportable change value bufferLength
The length of the data buffer
This callback gives the application an opportunity to define the reportable change value for each attribute that is being reported. This callback is called when a reporting configuration is reset to its defaults.
void emberZclGetDefaultReportingConfigurationCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclReportingConfiguration_t * |
configuration
|
||
) |
Get the default reporting configuration for a cluster on an endpoint.
- Parameters
-
endpointId
The endpoint to which the reporting configuration applies clusterSpec
The cluster to which the reporting configuration applies configuration
The reporting configuration structure to populate with the default reporting configuration
This callback gives the application an opportunity to define the default reporting configuration for each cluster on each endpoint. The configuration parameter will be passed with default values and the application is expected to update this parameter with its desired reporting configuration. This callback is called when a reporting configuration is reset to its defaults.
void emberZclGetPublicKeyCallback | ( | const uint8_t ** |
publicKey,
|
uint16_t * |
publicKeySize
|
||
) |
Get the public key used in the application.
- Parameters
-
publicKey
The returned pointer to the public key data publicKeySize
The returned size of the public key data
The public key data is used to generate this device's UID.
- Note
- Both the publicKey and publicKeySize parameters are meant to be assigned by the implementation of this call. The expectation is that the public key is a global value, so that the pointer provided by the implementation of this callback will point to constant public key data.
void emberZclNotificationCallback | ( | const EmberZclNotificationContext_t * |
context,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
const void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
A notification has been received.
- Parameters
-
context
Information about the notification clusterSpec
The cluster to which the attribute applies attributeId
The attribute ID to which the notification applies buffer
The data buffer containing the reported attribute value bufferLength
The length of the data buffer
void emberZclPostAttributeChangeCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
const void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
An attribute has changed value.
- Parameters
-
endpointId
The endpoint to which the new attribute value applies clusterSpec
The cluster to which the new attribute value applies attributeId
The attribute ID buffer
The data representing the new attribute value bufferLength
The length of the new attribute value data
This callback gives the application an opportunity to react to an attribute changing value.
- See also
- emberZclPreAttributeChangeCallback
bool emberZclPreAttributeChangeCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
const void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
An attribute is about to change value.
- Parameters
-
endpointId
The endpoint to which the new attribute value applies clusterSpec
The cluster to which the new attribute value applies attributeId
The attribute ID buffer
The data representing the new attribute value bufferLength
The length of the new attribute value data
- Returns
-
true
if the attribute should take this new value,false
otherwise.
This callback gives the application an opportunity to prevent an attribute from changing value by returning
false
.
- See also
- emberZclPostAttributeChangeCallback
EmberZclStatus_t emberZclReadExternalAttributeCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
An external attribute value needs to be read.
- Parameters
-
endpointId
The endpoint to which the attribute value applies clusterSpec
The cluster to which the attribute value applies attributeId
The attribute ID buffer
The data buffer into which the attribute value will be read bufferLength
The length of the data buffer
- Returns
- An EmberZclStatus_t value representing the success or failure of the read operation.
This callback alerts the application that an externally stored attribute needs to be read. The application is expected to read the attribute value from its external storage, populate the buffer parameter with the attribute value, and return an EmberZclStatus_t value representing the success or failure of the read operation.
References EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE .
EmberZclStatus_t emberZclWriteExternalAttributeCallback | ( | EmberZclEndpointId_t |
endpointId,
|
const EmberZclClusterSpec_t * |
clusterSpec,
|
||
EmberZclAttributeId_t |
attributeId,
|
||
const void * |
buffer,
|
||
size_t |
bufferLength
|
||
) |
An external attribute value needs to be written.
- Parameters
-
endpointId
The endpoint to which the attribute value applies clusterSpec
The cluster to which the attribute value applies attributeId
The attribute ID buffer
The data buffer holding the attribute value to be written bufferLength
The length of the data buffer
- Returns
- An EmberZclStatus_t value representing the success or failure of the write operation.
This callback alerts the application that an externally stored attribute needs to be written. The application is expected to write the attribute value to its external storage and return an EmberZclStatus_t value representing the success or failure of the write operation.
References EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE .