Device Database#
API and Callbacks for the Device Database Component.
This component provides an API to add/remove a device from a list of known devices, and to record their list of endpoints and clusters.
API#
Get device by index.
Find device by status.
Find device by EUI64.
Add to the device database.
Erase device from device database.
Set device endpoints.
Get device endpoint from index.
Get index from endpoint.
Set clusters from endpoint.
Clear the failed DB discovery count.
Get device database status string.
Set device database status.
Add device to database with all information.
Check if a device has cluster.
Create a new search.
Find device supporting cluster.
API Documentation#
sl_zigbee_af_device_database_get_device_by_index#
const sl_zigbee_af_device_info_t * sl_zigbee_af_device_database_get_device_by_index (uint16_t index)
Get device by index.
N/A | index | Ver.: always |
Returns
sl_zigbee_af_device_info_t Device Information struct
44
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_find_device_by_status#
const sl_zigbee_af_device_info_t * sl_zigbee_af_device_database_find_device_by_status (sl_zigbee_af_device_discovery_status_t status)
Find device by status.
N/A | status | Ver.: always |
Returns
sl_zigbee_af_device_info_t Device Information struct
53
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_find_device_by_eui64#
const sl_zigbee_af_device_info_t * sl_zigbee_af_device_database_find_device_by_eui64 (sl_802154_long_addr_t eui64)
Find device by EUI64.
N/A | eui64 |
Returns
sl_zigbee_af_device_info_t Device Information struct
62
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_add#
const sl_zigbee_af_device_info_t * sl_zigbee_af_device_database_add (sl_802154_long_addr_t eui64, uint8_t zigbeeCapabilities)
Add to the device database.
N/A | eui64 | Ver.: always |
N/A | zigbeeCapabilities | Ver.: always |
Returns
sl_zigbee_device_info_t
72
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_erase_device#
bool sl_zigbee_af_device_database_erase_device (sl_802154_long_addr_t eui64)
Erase device from device database.
N/A | eui64 | Ver.: always |
Returns
bool true is success
81
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_set_endpoints#
bool sl_zigbee_af_device_database_set_endpoints (const sl_802154_long_addr_t eui64, const uint8_t * endpointList, uint8_t endpointCount)
Set device endpoints.
N/A | eui64 | |
N/A | endpointList | |
N/A | endpointCount |
Returns
bool true is success
92
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_get_device_endpoint_from_index#
uint8_t sl_zigbee_af_device_database_get_device_endpoint_from_index (const sl_802154_long_addr_t eui64, uint8_t index)
Get device endpoint from index.
N/A | eui64 | |
N/A | index |
Returns
uint8_t
104
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_get_index_from_endpoint#
uint8_t sl_zigbee_af_device_database_get_index_from_endpoint (uint8_t endpoint, const sl_802154_long_addr_t eui64)
Get index from endpoint.
N/A | endpoint | |
N/A | eui64 |
Note
Explicitly made the eui64 the second argument to prevent confusion between this function and the emberAfPluginDeviceDatabaseGetDeviceEndpointsFromIndex()
116
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_set_clusters_for_endpoint#
bool sl_zigbee_af_device_database_set_clusters_for_endpoint (const sl_802154_long_addr_t eui64, const sl_zigbee_af_cluster_list_t * clusterList)
Set clusters from endpoint.
N/A | eui64 | |
N/A | clusterList |
Returns
bool true is success
127
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_clear_all_failed_discovery_status#
bool sl_zigbee_af_device_database_clear_all_failed_discovery_status (uint8_t maxFailureCount)
Clear the failed DB discovery count.
N/A | maxFailureCount |
Returns
bool true is success
135
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_get_status_string#
const char * sl_zigbee_af_device_database_get_status_string (sl_zigbee_af_device_discovery_status_t status)
Get device database status string.
N/A | status |
Returns
const char* status string
144
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_set_status#
bool sl_zigbee_af_device_database_set_status (const sl_802154_long_addr_t deviceEui64, sl_zigbee_af_device_discovery_status_t newStatus)
Set device database status.
N/A | deviceEui64 | |
N/A | newStatus |
Returns
bool true is success.
154
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_add_device_with_all_info#
const sl_zigbee_af_device_info_t * sl_zigbee_af_device_database_add_device_with_all_info (const sl_zigbee_af_device_info_t * newDevice)
Add device to database with all information.
N/A | newDevice | Struct pointer to device infor |
Returns
sl_zigbee_device_info_t
163
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_does_device_have_cluster#
sl_status_t sl_zigbee_af_device_database_does_device_have_cluster (sl_802154_long_addr_t deviceEui64, sl_zigbee_af_cluster_id_t clusterToFind, bool server, uint8_t * returnEndpoint)
Check if a device has cluster.
N/A | deviceEui64 | |
N/A | clusterToFind | |
N/A | server | |
N/A | returnEndpoint |
Returns
sl_status_t status code
175
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_create_new_search#
void sl_zigbee_af_device_database_create_new_search (sl_zigbee_af_device_database_iterator_t * iterator)
Create a new search.
N/A | iterator |
185
of file app/framework/plugin/device-database/device-database.h
sl_zigbee_af_device_database_find_device_supporting_cluster#
sl_status_t sl_zigbee_af_device_database_find_device_supporting_cluster (sl_zigbee_af_device_database_iterator_t * iterator, sl_zigbee_af_cluster_id_t clusterToFind, bool server, uint8_t * returnEndpoint)
Find device supporting cluster.
N/A | iterator | |
N/A | clusterToFind | |
N/A | server | |
N/A | returnEndpoint |
Returns
sl_status_t status code
196
of file app/framework/plugin/device-database/device-database.h