nRF Connect SDK API 0.1.0
|
void(*const bt_mesh_lightness_srv_handlers::light_set) (struct bt_mesh_lightness_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_set *set, struct bt_mesh_lightness_status *rsp) |
Set the Light 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 Light state at the end of the transition.
When performing a non-instantaneous state change, the Light state at any intermediate point must be clamped to the current lightness range of the server using bt_mesh_lightness_clamp.
[in] | srv | Server to set the Light state of. |
[in] | ctx | Message context, or NULL if the state change was not a result of a message. |
[in] | set | Parameters of the state change. |
[out] | rsp | Response structure to be filled. |