Generic Level models¶
The Generic Level models allows remote control of integer states on a mesh device.
The Generic Level models also feature their own common types, listed below. For types common to all models, see Bluetooth mesh models.
Common types¶
This section lists the types common to the Generic Level mesh models.
include/bluetooth/mesh/gen_lvl.h
-
group
bt_mesh_lvl
Common API for the Bluetooth mesh Generic Level models.
-
struct
bt_mesh_lvl_set
¶ - #include <gen_lvl.h>
Generic Level set message parameters.
Public Members
-
int16_t
lvl
¶ New level.
-
bool
new_transaction
¶ Whether this is a new action.
-
const struct bt_mesh_model_transition *
transition
¶ Transition time parameters for the state change. Setting the transition to NULL makes the server use its default transition time parameters.
-
int16_t
-
struct
bt_mesh_lvl_delta_set
¶ - #include <gen_lvl.h>
Generic Level delta set message parameters.
Public Members
-
int32_t
delta
¶ Translation from original value.
-
bool
new_transaction
¶ Whether this is a new transaction. If true, the delta should be relative to the current value. If false, the delta should be relative to the original value in the previous delta_set command.
-
const struct bt_mesh_model_transition *
transition
¶ Transition time parameters for the state change. Setting the transition to NULL makes the server use its default transition time parameters.
-
int32_t
-
struct
bt_mesh_lvl_move_set
¶ - #include <gen_lvl.h>
Generic Level move set message parameters.
Public Members
-
int16_t
delta
¶ Translation to make for every transition step.
-
bool
new_transaction
¶ Whether this is a new action.
-
const struct bt_mesh_model_transition *
transition
¶ Transition parameters.
delay
indicates time until the move should start,transition
indicates the amount of time eachdelta
step should take. Setting the transition to NULL makes the server use its default transition time parameters.
-
int16_t
-
struct
bt_mesh_lvl_status
¶ - #include <gen_lvl.h>
Generic Level status message parameters.
Public Members
-
int16_t
current
¶ Current level value.
-
int16_t
target
¶ Target value for the ongoing transition. If there’s no ongoing transition,
target
should matchvalue
.
-
int32_t
remaining_time
¶ Time remaining of the ongoing transition (in milliseconds), or SYS_FOREVER_MS. If there’s no ongoing transition,
remaining_time
is 0.
-
int16_t
-
struct