Modules#
EmberAfPluginEsiManagementEsiEntry
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.
API#
Typedefs#
Macros#
API Documentation#
emberAfPluginEsiManagementEsiLookUpByShortIdAndEndpoint#
EmberAfPluginEsiManagementEsiEntry * emberAfPluginEsiManagementEsiLookUpByShortIdAndEndpoint (EmberNodeId shortId, uint8_t endpoint)
N/A | shortId | |
N/A | endpoint |
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.
68
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementEsiLookUpByLongIdAndEndpoint#
EmberAfPluginEsiManagementEsiEntry * emberAfPluginEsiManagementEsiLookUpByLongIdAndEndpoint (EmberEUI64 longId, uint8_t endpoint)
N/A | longId | |
N/A | endpoint |
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.
77
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementIndexLookUpByShortIdAndEndpoint#
uint8_t emberAfPluginEsiManagementIndexLookUpByShortIdAndEndpoint (EmberNodeId shortId, uint8_t endpoint)
N/A | shortId | |
N/A | endpoint |
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.
87
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementIndexLookUpByLongIdAndEndpoint#
uint8_t emberAfPluginEsiManagementIndexLookUpByLongIdAndEndpoint (EmberEUI64 longId, uint8_t endpoint)
N/A | longId | |
N/A | endpoint |
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.
97
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementEsiLookUpByIndex#
EmberAfPluginEsiManagementEsiEntry * emberAfPluginEsiManagementEsiLookUpByIndex (uint8_t index)
N/A | index |
Search in the ESI table by the table index.
Returns a pointer to the ESI entry stored at the index passed as parameter.
106
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementGetNextEntry#
EmberAfPluginEsiManagementEsiEntry * emberAfPluginEsiManagementGetNextEntry (EmberAfPluginEsiManagementEsiEntry * entry, uint8_t age)
N/A | entry | |
N/A | age |
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.
117
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementGetFreeEntry#
EmberAfPluginEsiManagementEsiEntry * emberAfPluginEsiManagementGetFreeEntry (void )
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 EMBER_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGE (if any) and returns it, otherwise it returns NULL.
130
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementDeleteEntry#
void emberAfPluginEsiManagementDeleteEntry (uint8_t index)
N/A | index |
Delete the entry indicated by the parameter 'index' from the ESI table.
136
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementAgeAllEntries#
void emberAfPluginEsiManagementAgeAllEntries (void )
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 EMBER_NULL_NODE_ID.
142
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementClearTable#
void emberAfPluginEsiManagementClearTable (void )
N/A |
Clear the ESI table, i.e., set the short ID of each entry to EMBER_NULL_NODE_ID.
148
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementSubscribeToDeletionAnnouncements#
bool emberAfPluginEsiManagementSubscribeToDeletionAnnouncements (EmberAfEsiManagementDeletionCallback callback)
N/A | callback |
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.
158
of file app/framework/plugin/esi-management/esi-management.h
emberAfPluginEsiManagementUpdateEsiAndGetIndex#
uint8_t emberAfPluginEsiManagementUpdateEsiAndGetIndex (const EmberAfClusterCommand * cmd)
N/A | cmd |
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.
170
of file app/framework/plugin/esi-management/esi-management.h
Typedef Documentation#
EmberAfEsiManagementDeletionCallback#
typedef void(* EmberAfEsiManagementDeletionCallback) (uint8_t) )(uint8_t)
55
of file app/framework/plugin/esi-management/esi-management.h
Macro Definition Documentation#
EMBER_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGE#
#define EMBER_AF_PLUGIN_ESI_MANAGEMENT_MIN_ERASING_AGEValue:
3
40
of file app/framework/plugin/esi-management/esi-management.h
EMBER_AF_PLUGIN_ESI_MANAGEMENT_PLUGIN_CALLBACK_TABLE_SIZE#
#define EMBER_AF_PLUGIN_ESI_MANAGEMENT_PLUGIN_CALLBACK_TABLE_SIZEValue:
5
44
of file app/framework/plugin/esi-management/esi-management.h