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

◆ set

void(*const bt_mesh_light_hue_srv_handlers::set) (struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue *set, struct bt_mesh_light_hue_status *rsp)

Set the Hue 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 Hue state at the end of the transition.

When a state change is not-instantaneous, the bt_mesh_light_hue::direction field represents a direction in which the value of the Hue state should change. When the target value of the Hue state is less than the current value and the direction field is positive, or when the target value is greater than the current value and the direction field is negative, the application is responsible for wrapping the value of the Hue state around when the value reaches the end of the type range.

Note
This handler is mandatory.
Parameters
[in]srvServer to set the Hue state of.
[in]ctxMessage context.
[in]setParameters of the state change.
[out]rspResponse structure to be filled.