Data Structures

struct EmberZclAttributeContext_t
struct EmberZclAttributeWriteData_t

Macros

#define EMBER_ZCL_ATTRIBUTE_CLUSTER_REVISION 0xFFFD
#define EMBER_ZCL_ATTRIBUTE_REPORTING_STATUS 0xFFFE
#define EMBER_ZCL_ATTRIBUTE_NULL (( EmberZclAttributeId_t )-1)
#define EMBER_ZCL_CLUSTER_REVISION_PRE_ZCL6 0
#define EMBER_ZCL_CLUSTER_REVISION_ZCL6 1
#define EMBER_ZCL_CLUSTER_REVISION_NULL (( EmberZclClusterRevision_t )-1)

Typedefs

typedef uint16_t EmberZclAttributeId_t
typedef uint16_t EmberZclClusterRevision_t
typedef void(* EmberZclReadAttributeResponseHandler ) ( EmberZclMessageStatus_t status, const EmberZclAttributeContext_t *context, const void *buffer, size_t bufferLength)
typedef void(* EmberZclWriteAttributeResponseHandler ) ( EmberZclMessageStatus_t status, const EmberZclAttributeContext_t *context)

Functions

void emberZclResetAttributes ( EmberZclEndpointId_t endpointId)
EmberZclStatus_t emberZclReadAttribute ( EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, void *buffer, size_t bufferLength)
EmberZclStatus_t emberZclWriteAttribute ( EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)
EmberZclStatus_t emberZclExternalAttributeChanged ( EmberZclEndpointId_t endpointId, const EmberZclClusterSpec_t *clusterSpec, EmberZclAttributeId_t attributeId, const void *buffer, size_t bufferLength)
EmberStatus emberZclSendAttributeRead (const EmberZclDestination_t *destination, const EmberZclClusterSpec_t *clusterSpec, const EmberZclAttributeId_t *attributeIds, size_t attributeIdsCount, const EmberZclReadAttributeResponseHandler handler )
EmberStatus emberZclSendAttributeWrite (const EmberZclDestination_t *destination, const EmberZclClusterSpec_t *clusterSpec, const EmberZclAttributeWriteData_t *attributeWriteData, size_t attributeWriteDataCount, const EmberZclWriteAttributeResponseHandler handler )

Detailed Description

See zcl-core-types.h for source code.

See zcl-core.h for source code.

Macro Definition Documentation

#define EMBER_ZCL_ATTRIBUTE_CLUSTER_REVISION   0xFFFD

An attribute identifier for the Cluster revision.

#define EMBER_ZCL_ATTRIBUTE_NULL   (( EmberZclAttributeId_t )-1)

A distinguished value that represents a null (invalid) attribute identifier.

#define EMBER_ZCL_ATTRIBUTE_REPORTING_STATUS   0xFFFE

An attribute identifier for a Reporting status.

#define EMBER_ZCL_CLUSTER_REVISION_NULL   (( EmberZclClusterRevision_t )-1)

A distinguished value that represents a null (invalid) cluster revision.

#define EMBER_ZCL_CLUSTER_REVISION_PRE_ZCL6   0

A cluster revision for Pre-ZCL 6 specification.

#define EMBER_ZCL_CLUSTER_REVISION_ZCL6   1

A cluster revision for ZCL 6 specification.

Typedef Documentation

typedef uint16_t EmberZclAttributeId_t

An attribute identifier.

A cluster revision.

typedef void(* EmberZclReadAttributeResponseHandler) ( EmberZclMessageStatus_t status, const EmberZclAttributeContext_t *context, const void *buffer, size_t bufferLength)

A handler fired when reading attributes.

Parameters
status A message status
context A context of a read attribute
buffer A content of a read attribute
bufferLength Content length
Note
context->status shows whether attribute was read successfully or if an error occured. If successful, a buffer contains an attribute value. If unsuccessful, the buffer is irrelevant.
See also
emberZclSendAttributeRead()
typedef void(* EmberZclWriteAttributeResponseHandler) ( EmberZclMessageStatus_t status, const EmberZclAttributeContext_t *context)

A handler fired when writing attributes.

Parameters
status A message status
context A context of a written attribute
Note
context->status shows whether attribute was written successfully or if an error occured.
See also
emberZclSendAttributeWrite()

Function Documentation

EmberZclStatus_t emberZclExternalAttributeChanged ( EmberZclEndpointId_t endpointId,
const EmberZclClusterSpec_t * clusterSpec,
EmberZclAttributeId_t attributeId,
const void * buffer,
size_t bufferLength
)

This function notifies the core code that an externally stored attribute has changed.

Parameters
endpointId An endpoint identifier of the attribute
clusterSpec A cluster specification of the attribute
attributeId An attribute identifier that is changed
buffer A buffer to write the attribute from
bufferLength Length of the write buffer
Returns
Note
emberZclPostAttributeChangeCallback is triggered for a successful call to this function.
EmberZclStatus_t emberZclReadAttribute ( EmberZclEndpointId_t endpointId,
const EmberZclClusterSpec_t * clusterSpec,
EmberZclAttributeId_t attributeId,
void * buffer,
size_t bufferLength
)

This function reads the value of an attibute.

Parameters
endpointId An endpoint identifier of the attribute
clusterSpec A cluster specification of the attribute
attributeId An attribute identifier to read
buffer A buffer to read the attribute into
bufferLength Length of the read buffer
Returns
Note
emberZclReadExternalAttributeCallback is triggered if attribute is externally stored. If so, the result of that call is returned.
void emberZclResetAttributes ( EmberZclEndpointId_t endpointId )

This function resets all local attributes on given endpoint.

Parameters
endpointId An endpoint identifier
Note
emberZclPostAttributeChangeCallback is triggered after each attribute is changed.
EmberStatus emberZclSendAttributeRead ( const EmberZclDestination_t * destination,
const EmberZclClusterSpec_t * clusterSpec,
const EmberZclAttributeId_t * attributeIds,
size_t attributeIdsCount,
const EmberZclReadAttributeResponseHandler handler
)

This function sends an attribute read command to a specified destination.

Parameters
destination A location to read the attribute from
clusterSpec A cluster specification of the attribute
attributeIds An array of attribute IDs to read
attributeIdsCount A total count of EmberZclAttributeId_t elements in a passed array
handler callback that is triggered for a response
Returns
See also
EmberZclReadAttributeResponseHandler()
EmberStatus emberZclSendAttributeWrite ( const EmberZclDestination_t * destination,
const EmberZclClusterSpec_t * clusterSpec,
const EmberZclAttributeWriteData_t * attributeWriteData,
size_t attributeWriteDataCount,
const EmberZclWriteAttributeResponseHandler handler
)

This function sends an attribute write command to a specified destination.

Parameters
destination A location to write the attribute to
clusterSpec A cluster specification of the attribute
attributeWriteData An array containing write data for attributes
attributeWriteDataCount A total count of EmberZclAttributeWriteData_t elements in a passed array
handler A callback that is triggered for a response
Returns
See also
EmberZclWriteAttributeResponseHandler()
EmberZclStatus_t emberZclWriteAttribute ( EmberZclEndpointId_t endpointId,
const EmberZclClusterSpec_t * clusterSpec,
EmberZclAttributeId_t attributeId,
const void * buffer,
size_t bufferLength
)

This function writes the value of an attibute.

Parameters
endpointId An endpoint identifier of the attribute
clusterSpec A cluster specification of the attribute
attributeId An attribute identifier to write
buffer A buffer to write the attribute from
bufferLength Length of the write buffer
Returns
Note
emberZclWriteExternalAttributeCallback is triggered if the attribute is externally stored. If so, the result of that call is returned.
emberZclPostAttributeChangeCallback is triggered after the attribute is successfully changed.