Generic Power Level models¶
The Generic Power Level models allow remote control of power levels on a mesh device. Typical applications for the Generic Power Level model are heaters, fans and dimmer outlets.
The Generic Power 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 Power Level mesh models.
include/bluetooth/mesh/gen_plvl.h
-
group
bt_mesh_plvl
API for the Generic Power Level models.
Functions
-
uint8_t
bt_mesh_plvl_to_percent
(uint16_t plvl)¶ Convert Power Level to a percent.
- Return
The Power Level in percent.
- Parameters
[in] plvl
: Raw Power Level.
-
uint16_t
bt_mesh_plvl_from_percent
(uint8_t plvl_percent)¶ Convert percent to raw Power Level.
- Return
The raw Power Level.
- Parameters
[in] plvl_percent
: Power Level in percent.
-
struct
bt_mesh_plvl_set
¶ - #include <gen_plvl.h>
Power Level set message parameters.
Public Members
-
uint16_t
power_lvl
¶ Power Level.
-
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.
-
uint16_t
-
struct
bt_mesh_plvl_status
¶ - #include <gen_plvl.h>
Power Level status message parameters.
-
struct
bt_mesh_plvl_range
¶ - #include <gen_plvl.h>
Power Level range parameters.
-
struct
bt_mesh_plvl_range_status
¶ - #include <gen_plvl.h>
Power Level range message parameters.
Public Members
-
enum bt_mesh_model_status
status
¶ Status of the previous operation.
-
struct bt_mesh_plvl_range
range
¶ Current Power Level range.
-
enum bt_mesh_model_status
-
uint8_t