mesh: provide mesh_network_key_list_count

This commit is contained in:
Matthias Ringwald 2019-04-24 09:54:55 +02:00
parent 04ca154102
commit a6f6e623b5
2 changed files with 10 additions and 0 deletions

View File

@ -74,6 +74,10 @@ mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index){
return NULL;
}
int mesh_network_key_list_count(void){
return btstack_linked_list_count(&network_keys);
}
// mesh network key iterator over all keys
void mesh_network_key_iterator_init(mesh_network_key_iterator_t *it){
btstack_linked_list_iterator_init(&it->it, &network_keys);

View File

@ -128,6 +128,12 @@ int mesh_network_key_remove(mesh_network_key_t * network_key);
*/
mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index);
/**
* @brief Get number of stored network_keys
* @returns count
*/
int mesh_network_key_list_count(void);
/**
* @brief Initialize network key list from provisioning data
* @param provisioning_data