nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ set

void(*const bt_mesh_lvl_srv_handlers::set) (struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lvl_set *set, struct bt_mesh_lvl_status *rsp)

Set the Level state.

When a set message is received, the model publishes a status message, with the response set to rsp. When an acknowledged set message is received, the model also sends a response back to a client. If a state change is non-instantaneous, for example when bt_mesh_model_transition_time returns a nonzero value, the application is responsible for publishing a value of the Level state at the end of the transition.

Note
This handler is mandatory.
Parameters
[in]srvLevel server to set the state of.
[in]ctxMessage context for the message that triggered the change, or NULL if the change is not coming from a message.
[in]setParameters of the state change. Note that the transition will always be non-NULL.
[out]rspResponse structure to be filled.