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.

typedef uint16_t EmberZclClusterRevision_t

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
statusA message status
contextA context of a read attribute
bufferA content of a read attribute
bufferLengthContent 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
statusA message status
contextA 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
endpointIdAn endpoint identifier of the attribute
clusterSpecA cluster specification of the attribute
attributeIdAn attribute identifier that is changed
bufferA buffer to write the attribute from
bufferLengthLength 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
endpointIdAn endpoint identifier of the attribute
clusterSpecA cluster specification of the attribute
attributeIdAn attribute identifier to read
bufferA buffer to read the attribute into
bufferLengthLength 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
endpointIdAn 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
destinationA location to read the attribute from
clusterSpecA cluster specification of the attribute
attributeIdsAn array of attribute IDs to read
attributeIdsCountA total count of EmberZclAttributeId_t elements in a passed array
handlercallback 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
destinationA location to write the attribute to
clusterSpecA cluster specification of the attribute
attributeWriteDataAn array containing write data for attributes
attributeWriteDataCountA total count of EmberZclAttributeWriteData_t elements in a passed array
handlerA 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
endpointIdAn endpoint identifier of the attribute
clusterSpecA cluster specification of the attribute
attributeIdAn attribute identifier to write
bufferA buffer to write the attribute from
bufferLengthLength 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.