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#
emberAfPluginDeviceDatabaseGetDeviceByIndex#
const EmberAfDeviceInfo* emberAfPluginDeviceDatabaseGetDeviceByIndex (uint16_t index)
Get device by index.
N/A | index | Ver.: always |
Returns
EmberAfDeviceInfo Device Information struct
44
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseFindDeviceByStatus#
const EmberAfDeviceInfo* emberAfPluginDeviceDatabaseFindDeviceByStatus (EmberAfDeviceDiscoveryStatus status)
Find device by status.
N/A | status | Ver.: always |
Returns
EmberAfDeviceInfo Device Information struct
53
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseFindDeviceByEui64#
const EmberAfDeviceInfo* emberAfPluginDeviceDatabaseFindDeviceByEui64 (EmberEUI64 eui64)
Find device by EUI64.
N/A | eui64 |
Returns
EmberAfDeviceInfo Device Information struct
62
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseAdd#
const EmberAfDeviceInfo* emberAfPluginDeviceDatabaseAdd (EmberEUI64 eui64, uint8_t zigbeeCapabilities)
Add to the device database.
N/A | eui64 | Ver.: always |
N/A | zigbeeCapabilities | Ver.: always |
Returns
EmberDeviceInfo
72
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseEraseDevice#
bool emberAfPluginDeviceDatabaseEraseDevice (EmberEUI64 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
emberAfPluginDeviceDatabaseSetEndpoints#
bool emberAfPluginDeviceDatabaseSetEndpoints (const EmberEUI64 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
emberAfPluginDeviceDatabaseGetDeviceEndpointFromIndex#
uint8_t emberAfPluginDeviceDatabaseGetDeviceEndpointFromIndex (const EmberEUI64 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
emberAfPluginDeviceDatabaseGetIndexFromEndpoint#
uint8_t emberAfPluginDeviceDatabaseGetIndexFromEndpoint (uint8_t endpoint, const EmberEUI64 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
emberAfPluginDeviceDatabaseSetClustersForEndpoint#
bool emberAfPluginDeviceDatabaseSetClustersForEndpoint (const EmberEUI64 eui64, const EmberAfClusterList * 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
emberAfPluginDeviceDatabaseClearAllFailedDiscoveryStatus#
bool emberAfPluginDeviceDatabaseClearAllFailedDiscoveryStatus (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
emberAfPluginDeviceDatabaseGetStatusString#
const char* emberAfPluginDeviceDatabaseGetStatusString (EmberAfDeviceDiscoveryStatus 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
emberAfPluginDeviceDatabaseSetStatus#
bool emberAfPluginDeviceDatabaseSetStatus (const EmberEUI64 deviceEui64, EmberAfDeviceDiscoveryStatus 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
emberAfPluginDeviceDatabaseAddDeviceWithAllInfo#
const EmberAfDeviceInfo* emberAfPluginDeviceDatabaseAddDeviceWithAllInfo (const EmberAfDeviceInfo * newDevice)
Add device to database with all information.
N/A | newDevice | Struct pointer to device infor |
Returns
EmberDeviceInfo
163
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseDoesDeviceHaveCluster#
EmberStatus emberAfPluginDeviceDatabaseDoesDeviceHaveCluster (EmberEUI64 deviceEui64, EmberAfClusterId 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
EmberStatus status code
175
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseCreateNewSearch#
void emberAfPluginDeviceDatabaseCreateNewSearch (EmberAfDeviceDatabaseIterator * iterator)
Create a new search.
N/A | iterator |
185
of file app/framework/plugin/device-database/device-database.h
emberAfPluginDeviceDatabaseFindDeviceSupportingCluster#
EmberStatus emberAfPluginDeviceDatabaseFindDeviceSupportingCluster (EmberAfDeviceDatabaseIterator * iterator, EmberAfClusterId clusterToFind, bool server, uint8_t * returnEndpoint)
Find device supporting cluster.
N/A | iterator | |
N/A | clusterToFind | |
N/A | server | |
N/A | returnEndpoint |
Returns
EmberStatus status code
196
of file app/framework/plugin/device-database/device-database.h