Functions

void emberZclGetPublicKeyCallback (const uint8_t **publicKey, uint16_t *publicKeySize)
 
bool emberZclPreAttributeChangeCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)
 
void emberZclPostAttributeChangeCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)
 
EmberZclStatus_t emberZclReadExternalAttributeCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, void *buffer, size_t bufferLength)
 
EmberZclStatus_t emberZclWriteExternalAttributeCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)
 
void emberZclGetDefaultReportingConfigurationCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclReportingConfiguration_t *configuration)
 
void emberZclGetDefaultReportableChangeCallback (EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, void *buffer, size_t bufferLength)
 
void emberZclNotificationCallback (const EmberZclNotificationContext_t *context, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)

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
endpointIdThe endpoint to which the reportable change applies
clusterSpecThe cluster to which the reportable change applies
attributeIdThe attribute ID
bufferThe data buffer to populate with the reportable change value
bufferLengthThe 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.

See also
emberZclGetDefaultReportingConfigurationCallback
void emberZclGetDefaultReportingConfigurationCallback ( EmberZclEndpointId_t  endpointId,
const EmberZclClusterSpec_t clusterSpec,
EmberZclReportingConfiguration_t configuration 
)

Get the default reporting configuration for a cluster on an endpoint.

Parameters
endpointIdThe endpoint to which the reporting configuration applies
clusterSpecThe cluster to which the reporting configuration applies
configurationThe 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.

See also
emberZclGetDefaultReportableChangeCallback
void emberZclGetPublicKeyCallback ( const uint8_t **  publicKey,
uint16_t *  publicKeySize 
)

Get the public key used in the application.

Parameters
publicKeyThe returned pointer to the public key data
publicKeySizeThe 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
contextInformation about the notification
clusterSpecThe cluster to which the attribute applies
attributeIdThe attribute ID to which the notification applies
bufferThe data buffer containing the reported attribute value
bufferLengthThe 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
endpointIdThe endpoint to which the new attribute value applies
clusterSpecThe cluster to which the new attribute value applies
attributeIdThe attribute ID
bufferThe data representing the new attribute value
bufferLengthThe 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
endpointIdThe endpoint to which the new attribute value applies
clusterSpecThe cluster to which the new attribute value applies
attributeIdThe attribute ID
bufferThe data representing the new attribute value
bufferLengthThe 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
endpointIdThe endpoint to which the attribute value applies
clusterSpecThe cluster to which the attribute value applies
attributeIdThe attribute ID
bufferThe data buffer into which the attribute value will be read
bufferLengthThe 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.

See also
emberZclWriteExternalAttributeCallback

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
endpointIdThe endpoint to which the attribute value applies
clusterSpecThe cluster to which the attribute value applies
attributeIdThe attribute ID
bufferThe data buffer holding the attribute value to be written
bufferLengthThe 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.

See also
emberZclReadExternalAttributeCallback

References EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE.