Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Model callback functions. More...
#include <access.h>
Data Fields | |
int(*const | settings_set )(const struct bt_mesh_model *model, const char *name, size_t len_rd, settings_read_cb read_cb, void *cb_arg) |
Set value handler of user data tied to the model. | |
int(*const | start )(const struct bt_mesh_model *model) |
Callback called when the mesh is started. | |
int(*const | init )(const struct bt_mesh_model *model) |
Model init callback. | |
void(*const | reset )(const struct bt_mesh_model *model) |
Model reset callback. | |
void(*const | pending_store )(const struct bt_mesh_model *model) |
Callback used to store pending model's user data. | |
Model callback functions.
int(*const bt_mesh_model_cb::init) (const struct bt_mesh_model *model) |
Model init callback.
Called on every model instance during mesh initialization.
If any of the model init callbacks return an error, the Mesh subsystem initialization will be aborted, and the error will be returned to the caller of bt_mesh_init.
model | Model to be initialized. |
void(*const bt_mesh_model_cb::pending_store) (const struct bt_mesh_model *model) |
Callback used to store pending model's user data.
Triggered by bt_mesh_model_data_store_schedule.
To store the user data, call bt_mesh_model_data_store.
model | Model this callback belongs to. |
void(*const bt_mesh_model_cb::reset) (const struct bt_mesh_model *model) |
Model reset callback.
Called when the mesh node is reset. All model data is deleted on reset, and the model should clear its state.
model | Model this callback belongs to. |
int(*const bt_mesh_model_cb::settings_set) (const struct bt_mesh_model *model, const char *name, size_t len_rd, settings_read_cb read_cb, void *cb_arg) |
Set value handler of user data tied to the model.
model | Model to set the persistent data of. |
name | Name/key of the settings item. |
len_rd | The size of the data found in the backend. |
read_cb | Function provided to read the data from the backend. |
cb_arg | Arguments for the read function provided by the backend. |
int(*const bt_mesh_model_cb::start) (const struct bt_mesh_model *model) |
Callback called when the mesh is started.
This handler gets called after the node has been provisioned, or after all mesh data has been loaded from persistent storage.
When this callback fires, the mesh model may start its behavior, and all Access APIs are ready for use.
model | Model this callback belongs to. |