14#ifndef BT_MESH_LIGHTNESS_CLI_H__
15#define BT_MESH_LIGHTNESS_CLI_H__
33#define BT_MESH_LIGHTNESS_CLI_INIT(_handlers) \
35 .handlers = _handlers, \
44#define BT_MESH_MODEL_LIGHTNESS_CLI(_cli) \
45 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_CLI, \
46 _bt_mesh_lightness_cli_op, &(_cli)->pub, \
47 BT_MESH_MODEL_USER_DATA(struct bt_mesh_lightness_cli, \
49 &_bt_mesh_lightness_cli_cb)
71 struct bt_mesh_msg_ctx *ctx,
72 uint16_t default_light);
91 struct bt_mesh_msg_ctx *ctx,
103 struct bt_mesh_model_pub
pub;
108 BT_MESH_LIGHTNESS_OP_SET, BT_MESH_LIGHTNESS_MSG_MAXLEN_SET)];
139 struct bt_mesh_msg_ctx *ctx,
166 struct bt_mesh_msg_ctx *ctx,
209 struct bt_mesh_msg_ctx *ctx,
232 struct bt_mesh_msg_ctx *ctx,
272 struct bt_mesh_msg_ctx *ctx, uint16_t *rsp);
294 struct bt_mesh_msg_ctx *ctx,
295 uint16_t default_light, uint16_t *rsp);
313 struct bt_mesh_msg_ctx *ctx,
314 uint16_t default_light);
338 struct bt_mesh_msg_ctx *ctx, uint16_t *rsp);
341extern const struct bt_mesh_model_op _bt_mesh_lightness_cli_op[];
342extern const struct bt_mesh_model_cb _bt_mesh_lightness_cli_cb;
int bt_mesh_lightness_cli_range_set(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_range *range, struct bt_mesh_lightness_range_status *rsp)
Set the Light Range state in the server.
int bt_mesh_lightness_cli_default_get(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t *rsp)
Get the Default Light of the bound server.
int bt_mesh_lightness_cli_last_get(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t *rsp)
Get the last non-zero Light Level of the bound server.
int bt_mesh_lightness_cli_light_set_unack(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_set *set)
Set the Light Level of the server without requesting a response.
int bt_mesh_lightness_cli_range_get(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_lightness_range_status *rsp)
Get the Light Range of the bound server.
int bt_mesh_lightness_cli_light_set(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_set *set, struct bt_mesh_lightness_status *rsp)
Set the Light Level of the server.
int bt_mesh_lightness_cli_default_set_unack(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_light)
Set the Default Light state in the server without requesting a response.
int bt_mesh_lightness_cli_light_get(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_lightness_status *rsp)
Get the Light Level of the bound server.
int bt_mesh_lightness_cli_default_set(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_light, uint16_t *rsp)
Set the Default Light state in the server.
int bt_mesh_lightness_cli_range_set_unack(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_range *range)
Set the Light Range state in the server without requesting a response.
void(*const range_status)(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_range_status *status)
Light Range status message handler.
Definition: lightness_cli.h:80
void(*const light_status)(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lightness_status *status)
Light Level status message handler.
Definition: lightness_cli.h:60
void(*const default_status)(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t default_light)
Default Light status message handler.
Definition: lightness_cli.h:70
void(*const last_light_status)(struct bt_mesh_lightness_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t last)
Last non-zero Light Level status message handler.
Definition: lightness_cli.h:90
Definition: lightness_cli.h:52
const struct bt_mesh_lightness_cli_handlers *const handlers
Definition: lightness_cli.h:114
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: lightness_cli.h:110
struct net_buf_simple pub_buf
Definition: lightness_cli.h:105
struct bt_mesh_model_pub pub
Definition: lightness_cli.h:103
uint8_t tid
Definition: lightness_cli.h:112
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHTNESS_OP_SET, BT_MESH_LIGHTNESS_MSG_MAXLEN_SET)]
Definition: lightness_cli.h:108
const struct bt_mesh_model * model
Definition: lightness_cli.h:101
Definition: lightness_cli.h:99
Definition: lightness.h:64
Definition: lightness.h:58
Definition: lightness.h:30
Definition: lightness.h:44