Bluetooth: Mesh: Add key-value concept to store model data

Previous mode store function only can store single data,
change this to store as KV model, let's app-layer to manager
model data, other than by stack when node reset.

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
This commit is contained in:
Lingao Meng 2020-05-25 01:33:58 -07:00 committed by Carles Cufí
commit 7239dc1cbd
4 changed files with 35 additions and 20 deletions

View file

@ -3311,8 +3311,6 @@ static void mod_reset(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
if (clear_count) {
bt_mesh_store_mod_sub(mod);
}
bt_mesh_model_data_store(mod, vnd, NULL, 0);
}
if (mod->cb && mod->cb->reset) {