Bluetooth: Mesh: Add model reset callback
Adds additional model callback that gets called on node_reset. Will also erase any user data when this happens. Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
parent
91ca7ca763
commit
b7d05fbf13
4 changed files with 34 additions and 7 deletions
|
@ -422,6 +422,15 @@ struct bt_mesh_model_cb {
|
|||
* @return 0 on success, error otherwise.
|
||||
*/
|
||||
int (*const init)(struct bt_mesh_model *model);
|
||||
|
||||
/** @brief Model reset callback.
|
||||
*
|
||||
* Called when the mesh node is reset. All model data is deleted on
|
||||
* reset, and the model should clear its state.
|
||||
*
|
||||
* @param model Model this callback belongs to.
|
||||
*/
|
||||
void (*const reset)(struct bt_mesh_model *model);
|
||||
};
|
||||
|
||||
/** Abstraction that describes a Mesh Model instance */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue