Binding Table#

EmberZNet binding table API.

See binding-table.h for source code.

Functions#

emberSetBinding(uint8_t index, EmberBindingTableEntry *value)

Set an entry in the binding table by copying the structure pointed to by value into the binding table.

emberGetBinding(uint8_t index, EmberBindingTableEntry *result)

Copy a binding table entry to the structure that the result points to.

emberDeleteBinding(uint8_t index)

Delete a binding table entry.

bool
emberBindingIsActive(uint8_t index)

Indicate whether any messages are currently being sent using this binding table entry.

EmberNodeId

Return the node ID for the binding's destination if the ID is known.

void
emberSetBindingRemoteNodeId(uint8_t index, EmberNodeId id)

Set the node ID for the binding's destination. See emberGetBindingRemoteNodeId() for a description.

Delete all binding table entries.

emberRemoteSetBindingHandler(EmberBindingTableEntry *entry)

A callback invoked when a remote node requests that a binding be added to the local binding table (via the ZigBee Device Object at endpoint 0).

Invoked when a remote node requests that a binding be removed from the local binding table (via the ZigBee Device Object at endpoint 0).

uint8_t

Return a binding index that matches the current incoming message, if known.

emberSetReplyBinding(uint8_t index, EmberBindingTableEntry *entry)

Create a binding table entry for the sender of a message, which can be used to send messages to that sender.

Update the routing information associated with a binding table entry for the sender of a message.

Function Documentation#

emberSetBinding#

EmberStatus emberSetBinding (uint8_t index, EmberBindingTableEntry * value)

Set an entry in the binding table by copying the structure pointed to by value into the binding table.

Parameters
N/Aindex

The index of a binding table entry.

N/Avalue

A pointer to a structure.

Note

  • You do not need to reserve memory for value.

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 40 of file stack/include/binding-table.h

emberGetBinding#

EmberStatus emberGetBinding (uint8_t index, EmberBindingTableEntry * result)

Copy a binding table entry to the structure that the result points to.

Parameters
N/Aindex

The index of a binding table entry.

N/Aresult

A pointer to the location to which to copy the binding table entry.

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 53 of file stack/include/binding-table.h

emberDeleteBinding#

EmberStatus emberDeleteBinding (uint8_t index)

Delete a binding table entry.

Parameters
N/Aindex

The index of a binding table entry.

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 62 of file stack/include/binding-table.h

emberBindingIsActive#

bool emberBindingIsActive (uint8_t index)

Indicate whether any messages are currently being sent using this binding table entry.

Parameters
N/Aindex

The index of a binding table entry.

Note that this function does not indicate whether a binding is clear. To determine whether a binding is clear, check the EmberBindingTableEntry structure that defines the binding. The type field should have the value EMBER_UNUSED_BINDING.

Returns

  • True if the binding table entry is active, false otherwise.


Definition at line 76 of file stack/include/binding-table.h

emberGetBindingRemoteNodeId#

EmberNodeId emberGetBindingRemoteNodeId (uint8_t index)

Return the node ID for the binding's destination if the ID is known.

Parameters
N/Aindex

The index of a binding table entry.

If a message is sent using the binding and the destination's ID is not known, the stack will discover the ID by broadcasting a ZDO address request. The application can avoid the need for this discovery by calling emberNoteSendersBinding() whenever a message arrives from the binding's destination, or by calling emberSetBindingRemoteNodeId() when it knows the correct ID via some other means, such as having saved it in nonvolatile memory.

The destination's node ID is forgotten when the binding is changed, when the local node reboots or, much more rarely, when the destination node changes its ID in response to an ID conflict.

Returns


Definition at line 99 of file stack/include/binding-table.h

emberSetBindingRemoteNodeId#

void emberSetBindingRemoteNodeId (uint8_t index, EmberNodeId id)

Set the node ID for the binding's destination. See emberGetBindingRemoteNodeId() for a description.

Parameters
N/Aindex

The index of a binding table entry.

N/Aid

The ID of the binding's destination.


Definition at line 108 of file stack/include/binding-table.h

emberClearBindingTable#

EmberStatus emberClearBindingTable (void )

Delete all binding table entries.

Parameters
N/A

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 115 of file stack/include/binding-table.h

emberRemoteSetBindingHandler#

EmberZdoStatus emberRemoteSetBindingHandler (EmberBindingTableEntry * entry)

A callback invoked when a remote node requests that a binding be added to the local binding table (via the ZigBee Device Object at endpoint 0).

Parameters
N/Aentry

A pointer to a new binding table entry.

The application is free to add the binding to the binding table, ignore the request, or take some other action. It is recommended that nonvolatile bindings be used for remote provisioning applications.

The binding's type defaults to EMBER_UNICAST_BINDING. The application should set the type as appropriate for the binding's local endpoint and cluster ID.

If the application includes emberRemoteSetBindingHandler(), it must define EMBER_APPLICATION_HAS_REMOTE_BINDING_HANDLER in its CONFIGURATION_HEADER and also include emberRemoteDeleteBindingHandler().

Returns


Definition at line 141 of file stack/include/binding-table.h

emberRemoteDeleteBindingHandler#

EmberZdoStatus emberRemoteDeleteBindingHandler (uint8_t index)

Invoked when a remote node requests that a binding be removed from the local binding table (via the ZigBee Device Object at endpoint 0).

Parameters
N/Aindex

The index of the binding entry to be removed.

The application is free to remove the binding from the binding table, ignore the request, or take some other action.

If the application includes emberRemoteDeleteBindingHandler(), it must define EMBER_APPLICATION_HAS_REMOTE_BINDING_HANDLER in its CONFIGURATION_HEADER and also include emberRemoteSetBindingHandler().

Returns


Definition at line 162 of file stack/include/binding-table.h

emberGetBindingIndex#

uint8_t emberGetBindingIndex (void )

Return a binding index that matches the current incoming message, if known.

Parameters
N/A

A binding matches the incoming message if:

  • The binding's source endpoint is the same as the message's destination endpoint.

  • The binding's destination endpoint is the same as the message's source endpoint.

  • The source of the message has been previously identified as the the binding's remote node by a successful address discovery or by the application via a call to either emberSetReplyBinding() or emberNoteSendersBinding().

Note

Returns

  • The index of a binding that matches the current incoming message or 0xFF if there is no matching binding.


Definition at line 184 of file stack/include/binding-table.h

emberSetReplyBinding#

EmberStatus emberSetReplyBinding (uint8_t index, EmberBindingTableEntry * entry)

Create a binding table entry for the sender of a message, which can be used to send messages to that sender.

Parameters
N/Aindex

The index of the binding to set.

N/Aentry

A pointer to data for the binding.

This function is identical to emberSetBinding() except that calling it tells the stack that this binding corresponds to the sender of the current message. The stack uses this information to associate the sender's routing info with the binding table entry. Note

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 203 of file stack/include/binding-table.h

emberNoteSendersBinding#

EmberStatus emberNoteSendersBinding (uint8_t index)

Update the routing information associated with a binding table entry for the sender of a message.

Parameters
N/Aindex

The index of the binding to update.

This function should be used in place of emberSetReplyBinding() when a message arrives from a remote endpoint for which a binding already exists.

Returns

  • An EmberStatus value that indicates the success or failure of the command.


Definition at line 216 of file stack/include/binding-table.h