Data Structures

struct  EmberZclBindingContext_t
 
struct  EmberZclBindingEntry_t

Macros

#define EMBER_ZCL_BINDING_NULL   ((EmberZclBindingId_t)-1)

Typedefs

typedef uint8_t EmberZclBindingId_t
 
typedef void(* EmberZclBindingResponseHandler) (EmberZclMessageStatus_t status, const EmberZclBindingContext_t *context, const EmberZclBindingEntry_t *entry)

Enumerations

enum  EmberZclScheme_t {
  EMBER_ZCL_SCHEME_COAP = 0x00,
  EMBER_ZCL_SCHEME_COAPS = 0x01
}
 
enum  EmberZclNetworkDestinationType_t {
  EMBER_ZCL_NETWORK_DESTINATION_TYPE_ADDRESS = 0x00,
  EMBER_ZCL_NETWORK_DESTINATION_TYPE_UID = 0x01
}

Functions

bool emberZclHasBinding (EmberZclBindingId_t bindingId)
 
bool emberZclGetBinding (EmberZclBindingId_t bindingId, EmberZclBindingEntry_t *entry)
 
bool emberZclSetBinding (EmberZclBindingId_t bindingId, const EmberZclBindingEntry_t *entry)
 
EmberZclBindingId_t emberZclAddBinding (const EmberZclBindingEntry_t *entry)
 
bool emberZclRemoveBinding (EmberZclBindingId_t bindingId)
 
bool emberZclRemoveAllBindings (void)
 
EmberStatus emberZclSendAddBinding (const EmberZclDestination_t *destination, const EmberZclBindingEntry_t *entry, const EmberZclBindingResponseHandler handler)
 
EmberStatus emberZclSendUpdateBinding (const EmberZclDestination_t *destination, const EmberZclBindingEntry_t *entry, EmberZclBindingId_t bindingId, const EmberZclBindingResponseHandler handler)
 
EmberStatus emberZclSendRemoveBinding (const EmberZclDestination_t *destination, const EmberZclClusterSpec_t *clusterSpec, EmberZclBindingId_t bindingId, const EmberZclBindingResponseHandler handler)
 
bool emberZclGetDestinationFromBinding (const EmberZclClusterSpec_t *clusterSpec, EmberZclBindingId_t *bindingIdx, EmberZclDestination_t *destination)

Detailed Description

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

See zcl-core.h for source code.

Macro Definition Documentation

#define EMBER_ZCL_BINDING_NULL   ((EmberZclBindingId_t)-1)

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

Typedef Documentation

typedef uint8_t EmberZclBindingId_t

A binding identifier.

typedef void(* EmberZclBindingResponseHandler) (EmberZclMessageStatus_t status, const EmberZclBindingContext_t *context, const EmberZclBindingEntry_t *entry)

A handler fired when adding, updating, or removing a binding.

Parameters
statusA message status
contextA context of binding to add, update, or remove
entryAn entry of binding to add, update, or remove
See also
emberZclSendAddBinding()
emberZclSendUpdateBinding()
emberZclSendRemoveBinding()

Enumeration Type Documentation

Defines possible types for a network destination.

Enumerator
EMBER_ZCL_NETWORK_DESTINATION_TYPE_ADDRESS 

A network destination uses an address type.

EMBER_ZCL_NETWORK_DESTINATION_TYPE_UID 

A network destination uses a unique identifier type.

Defines possible schemes for a network destination.

Enumerator
EMBER_ZCL_SCHEME_COAP 

Network destination uses standard CoAP scheme.

EMBER_ZCL_SCHEME_COAPS 

Network destination uses secure CoAP scheme.

Function Documentation

EmberZclBindingId_t emberZclAddBinding ( const EmberZclBindingEntry_t entry)

This function adds a given entry to the binding table.

Parameters
entryA binding entry to add to the table
Returns
  • A binding identifier of entry if it was added successfully
  • EMBER_ZCL_BINDING_NULL if entry was not added successfully

This function checks the binding table for duplicates. If a duplicate is found, a binding identifier of the previous entry is used. Otherwise, a new one is allocated. This function also validates contents of the given binding entry.

bool emberZclGetBinding ( EmberZclBindingId_t  bindingId,
EmberZclBindingEntry_t entry 
)

This function gets a specified binding.

Parameters
bindingIdA binding identifier of an entry to get
entryA binding entry to put the retrieved binding into
Returns
  • true if binding was retrieved successfully
  • false if binding was not retrieved successfully
bool emberZclGetDestinationFromBinding ( const EmberZclClusterSpec_t clusterSpec,
EmberZclBindingId_t bindingIdx,
EmberZclDestination_t destination 
)

This function gets destination from specified matching binding

Parameters
clusterSpeccluster specification of binding entry to remove
bindingIdxindex to start searching the binding table (index value is incremented on return if a matching binding is found)
destinationthe destination of the matching binding entry
Returns
  • true if matching binding was found
  • false if matching binding was not found
See also
EmberZclGetDestinationFromBinding()
bool emberZclHasBinding ( EmberZclBindingId_t  bindingId)

This function checks whether a specified binding exists.

Parameters
bindingIdA binding identifier to check
Returns
  • true if binding exists
  • false if binding does not exist
bool emberZclRemoveAllBindings ( void  )

This function removes all entries from the binding table.

Returns
  • true if all entries were removed successfully
  • false if all entries were not removed successfully
bool emberZclRemoveBinding ( EmberZclBindingId_t  bindingId)

This function removes a specified entry from the binding table.

Parameters
bindingIdA binding identifier of an entry to be removed from the table
Returns
  • true if an entry was removed successfully
  • false if an entry was not removed successfully
EmberStatus emberZclSendAddBinding ( const EmberZclDestination_t destination,
const EmberZclBindingEntry_t entry,
const EmberZclBindingResponseHandler  handler 
)

This function sends a command to a specified destination to add a binding.

Parameters
destinationA location to send the command to
entryA binding entry to add to destination's binding table
handlerA callback that is triggered for a response
Returns
See also
EmberZclBindingResponseHandler()
EmberStatus emberZclSendRemoveBinding ( const EmberZclDestination_t destination,
const EmberZclClusterSpec_t clusterSpec,
EmberZclBindingId_t  bindingId,
const EmberZclBindingResponseHandler  handler 
)

This function sends a command to a specified destination to remove a binding.

Parameters
destinationlocation to send command to
clusterSpeccluster specification of binding entry to remove
bindingIdBinding identifier to remove from destination's binding table
handlercallback that is triggered for response
Returns
See also
EmberZclBindingResponseHandler()
EmberStatus emberZclSendUpdateBinding ( const EmberZclDestination_t destination,
const EmberZclBindingEntry_t entry,
EmberZclBindingId_t  bindingId,
const EmberZclBindingResponseHandler  handler 
)

This function sends a command to a specified destination to update a binding.

Parameters
destinationA location to send a command to
entryA new binding entry to use for an update
bindingIdA binding identifier to update in destination's binding table
handlerA callback that is triggered for a response
Returns
See also
EmberZclBindingResponseHandler()
bool emberZclSetBinding ( EmberZclBindingId_t  bindingId,
const EmberZclBindingEntry_t entry 
)

This function sets a specified binding.

Parameters
bindingIdA binding identifier of entry to set
entryA new entry to set the binding to
Returns
  • true if binding was set successfully
  • false if binding was not set successfully