14#ifndef BT_MESH_GEN_PLVL_CLI_H__
15#define BT_MESH_GEN_PLVL_CLI_H__
32#define BT_MESH_PLVL_CLI_INIT(_handlers) \
34 .handlers = _handlers, \
43#define BT_MESH_MODEL_PLVL_CLI(_cli) \
44 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_POWER_LEVEL_CLI, \
45 _bt_mesh_plvl_cli_op, &(_cli)->pub, \
46 BT_MESH_MODEL_USER_DATA(struct bt_mesh_plvl_cli, \
48 &_bt_mesh_plvl_cli_cb)
60 struct bt_mesh_msg_ctx *ctx,
70 struct bt_mesh_msg_ctx *ctx,
71 uint16_t default_power);
90 struct bt_mesh_msg_ctx *ctx, uint16_t last);
99 const struct bt_mesh_model *
model;
101 struct bt_mesh_model_pub
pub;
106 BT_MESH_PLVL_OP_LEVEL_SET, BT_MESH_PLVL_MSG_MAXLEN_LEVEL_SET)];
134 struct bt_mesh_msg_ctx *ctx,
158 struct bt_mesh_msg_ctx *ctx,
176 struct bt_mesh_msg_ctx *ctx,
198 struct bt_mesh_msg_ctx *ctx,
221 struct bt_mesh_msg_ctx *ctx,
239 struct bt_mesh_msg_ctx *ctx,
261 struct bt_mesh_msg_ctx *ctx, uint16_t *rsp);
283 struct bt_mesh_msg_ctx *ctx,
284 uint16_t default_power, uint16_t *rsp);
302 struct bt_mesh_msg_ctx *ctx,
303 uint16_t default_power);
327 struct bt_mesh_msg_ctx *ctx, uint16_t *rsp);
330extern const struct bt_mesh_model_op _bt_mesh_plvl_cli_op[];
331extern const struct bt_mesh_model_cb _bt_mesh_plvl_cli_cb;
int bt_mesh_plvl_cli_power_set_unack(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_set *set)
Set the Power Level of the server without requesting a response.
int bt_mesh_plvl_cli_default_set(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_power, uint16_t *rsp)
Set the Default Power state in the server.
int bt_mesh_plvl_cli_range_set(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_range *range, struct bt_mesh_plvl_range_status *rsp)
Set the Power Range state in the server.
int bt_mesh_plvl_cli_power_set(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_set *set, struct bt_mesh_plvl_status *rsp)
Set the Power Level of the server.
int bt_mesh_plvl_cli_range_get(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_plvl_range_status *rsp)
Get the Power Range of the bound server.
int bt_mesh_plvl_cli_power_get(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_plvl_status *rsp)
Get the Power Level of the bound server.
int bt_mesh_plvl_cli_default_set_unack(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_power)
Set the Default Power state in the server without requesting a response.
int bt_mesh_plvl_cli_default_get(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t *rsp)
Get the Default Power of the bound server.
int bt_mesh_plvl_cli_range_set_unack(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_range *range)
Set the Power Range state in the server without requesting a response.
int bt_mesh_plvl_cli_last_get(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t *rsp)
Get the last non-zero Power Level of the bound server.
void(*const default_status)(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_power)
Default Power status message handler.
Definition: gen_plvl_cli.h:69
void(*const power_status)(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_status *status)
Power Level status message handler.
Definition: gen_plvl_cli.h:59
void(*const last_status)(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t last)
Last non-zero Power Level status message handler.
Definition: gen_plvl_cli.h:89
void(*const range_status)(struct bt_mesh_plvl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_plvl_range_status *status)
Power Range status message handler.
Definition: gen_plvl_cli.h:79
Definition: gen_plvl_cli.h:51
uint8_t tid
Definition: gen_plvl_cli.h:110
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: gen_plvl_cli.h:108
struct bt_mesh_model_pub pub
Definition: gen_plvl_cli.h:101
struct net_buf_simple pub_buf
Definition: gen_plvl_cli.h:103
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_PLVL_OP_LEVEL_SET, BT_MESH_PLVL_MSG_MAXLEN_LEVEL_SET)]
Definition: gen_plvl_cli.h:106
const struct bt_mesh_model * model
Definition: gen_plvl_cli.h:99
const struct bt_mesh_plvl_cli_handlers *const handlers
Definition: gen_plvl_cli.h:112
Definition: gen_plvl_cli.h:97
Definition: gen_plvl.h:59
Definition: gen_plvl.h:53
Definition: gen_plvl.h:25
Definition: gen_plvl.h:39