ESI Management#

API and Callbacks for the ESI Management Component.

This component maintains a table of ESIs that can be queried by other components. This is used by all Smart Energy client devices.

Modules#

sl_zigbee_af_plugin_esi_management_esi_entry_t

Typedefs#

API Documentation#

sl_zigbee_af_esi_management_esi_look_up_by_short_id_and_endpoint#

sl_zigbee_af_plugin_esi_management_esi_entry_t * sl_zigbee_af_esi_management_esi_look_up_by_short_id_and_endpoint (sl_802154_short_addr_t shortId, uint8_t endpoint)
Parameters
N/AshortId
N/Aendpoint

Search in the ESI table by the pair node (short ID, endopoint).

Returns a pointer to the entry if a matching entry was found. Otherwise, it returns NULL.


Definition at line 68 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_esi_look_up_by_long_id_and_endpoint#

sl_zigbee_af_plugin_esi_management_esi_entry_t * sl_zigbee_af_esi_management_esi_look_up_by_long_id_and_endpoint (sl_802154_long_addr_t longId, uint8_t endpoint)
Parameters
N/AlongId
N/Aendpoint

Search in the ESI table by the pair node (long ID, endopoint).

Returns a pointer to the entry if a matching entry was found. Otherwise, it returns NULL.


Definition at line 77 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_index_look_up_by_short_id_and_endpoint#

uint8_t sl_zigbee_af_esi_management_index_look_up_by_short_id_and_endpoint (sl_802154_short_addr_t shortId, uint8_t endpoint)
Parameters
N/AshortId
N/Aendpoint

Allow retrieving the index of an entry that matches the passed short ID and endpoint.

Returns the index of the matching entry if a matching entry was found. Otherwise, it returns 0xFF.


Definition at line 87 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_index_look_up_by_long_id_and_endpoint#

uint8_t sl_zigbee_af_esi_management_index_look_up_by_long_id_and_endpoint (sl_802154_long_addr_t longId, uint8_t endpoint)
Parameters
N/AlongId
N/Aendpoint

Allow retrieving the index of an entry that matches the passed long ID and endpoint.

Returns the index of the matching entry if a matching entry was found. Otherwise, it returns 0xFF.


Definition at line 97 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_esi_look_up_by_index#

sl_zigbee_af_plugin_esi_management_esi_entry_t * sl_zigbee_af_esi_management_esi_look_up_by_index (uint8_t index)
Parameters
N/Aindex

Search in the ESI table by the table index.

Returns a pointer to the ESI entry stored at the index passed as parameter.


Definition at line 106 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_get_next_entry#

sl_zigbee_af_plugin_esi_management_esi_entry_t * sl_zigbee_af_esi_management_get_next_entry (sl_zigbee_af_plugin_esi_management_esi_entry_t * entry, uint8_t age)
Parameters
N/Aentry
N/Aage

Iterate through the entries in the table that are within a certain age threshold.

If the passed pointer is NULL, it returns the first active entry with age lesser or equal than the passed age parameter (if any). Otherwise, it returns the next active entry that satisfy the age requirement. If the are no entries after the passed entry that satisfy the age requirement, it returns NULL.


Definition at line 117 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_get_free_entry#

sl_zigbee_af_plugin_esi_management_esi_entry_t * sl_zigbee_af_esi_management_get_free_entry (void )
Parameters
N/A

Allow obtaining a free entry in the ESI table. It is the requester responsibility to properly set all the fields in the obtained free entry such as nodeId, age, and so on to avoid inconsistencies in the table.

Returns a free entry (if any), otherwise it clears the oldest entry whose age is at least SL_ZIGBEE_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGE (if any) and returns it, otherwise it returns NULL.


Definition at line 130 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_delete_entry#

void sl_zigbee_af_esi_management_delete_entry (uint8_t index)
Parameters
N/Aindex

Delete the entry indicated by the parameter 'index' from the ESI table.


Definition at line 136 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_age_all_entries#

void sl_zigbee_af_esi_management_age_all_entries (void )
Parameters
N/A

Increase the age of all the active entries in the table. A non-active entry is an entry whose short ID is set to SL_ZIGBEE_NULL_NODE_ID.


Definition at line 142 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_clear_table#

void sl_zigbee_af_esi_management_clear_table (void )
Parameters
N/A

Clear the ESI table, i.e., set the short ID of each entry to SL_ZIGBEE_NULL_NODE_ID.


Definition at line 148 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_subscribe_to_deletion_announcements#

bool sl_zigbee_af_esi_management_subscribe_to_deletion_announcements (sl_zigbee_af_esi_management_deletion_callback_t callback)
Parameters
N/Acallback

Allow a plugin to subscribe to ESI entries deletion announcements by passing its own deletion callback function. Upon an entry deletion, all the deletion callback function are called passing the index of the deleted entry.

It returns true if the subscription was successful, false otherwise.


Definition at line 158 of file app/framework/plugin/esi-management/esi-management.h

sl_zigbee_af_esi_management_update_esi_and_get_index#

uint8_t sl_zigbee_af_esi_management_update_esi_and_get_index (const sl_zigbee_af_cluster_command_t * cmd)
Parameters
N/Acmd

Perform the following steps:

  • Search for the source node of the passed command in the ESI table.

  • Add a new entry in the ESI table if the source node is not present in the ESI table yet, or update the current entry if needed.

Returns

  • The index of the source node of the passed command in the ESI table, or it returns 0xFF if the ESI was not present in the table and a new entry could not be added since the table was full.


Definition at line 170 of file app/framework/plugin/esi-management/esi-management.h

Typedef Documentation#

sl_zigbee_af_esi_management_deletion_callback_t#

typedef void(* sl_zigbee_af_esi_management_deletion_callback_t) (uint8_t) )(uint8_t)

Definition at line 55 of file app/framework/plugin/esi-management/esi-management.h

Macro Definition Documentation#

SL_ZIGBEE_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGE#

#define SL_ZIGBEE_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGE
Value:
3

Definition at line 40 of file app/framework/plugin/esi-management/esi-management.h

SL_ZIGBEE_AF_PLUGIN_ESI_MANAGEMENT_PLUGIN_CALLBACK_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_ESI_MANAGEMENT_PLUGIN_CALLBACK_TABLE_SIZE
Value:
5

Definition at line 44 of file app/framework/plugin/esi-management/esi-management.h