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
-
static inline uint8_t bt_mesh_plvl_to_percent(uint16_t plvl)
Convert Power Level to a percent.
- Parameters:
plvl – [in] Raw Power Level.
- Returns:
The Power Level in percent.
-
static inline uint16_t bt_mesh_plvl_from_percent(uint8_t plvl_percent)
Convert percent to raw Power Level.
- Parameters:
plvl_percent – [in] Power Level in percent.
- Returns:
The raw Power Level.
-
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, or NULL.
When sending, setting the transition to NULL makes the receiver use its default transition time parameters, or 0 if no default transition time is set.
-
uint16_t power_lvl
-
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 status
-
static inline uint8_t bt_mesh_plvl_to_percent(uint16_t plvl)