nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
light_ctl_cli.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_LIGHT_CTL_CLI_H__
15#define BT_MESH_LIGHT_CTL_CLI_H__
16
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25
30#define BT_MESH_LIGHT_CTL_CLI_INIT(_handlers) \
31 { \
32 .handlers = _handlers, \
33 }
34
41#define BT_MESH_MODEL_LIGHT_CTL_CLI(_cli) \
42 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_CTL_CLI, \
43 _bt_mesh_light_ctl_cli_op, &(_cli)->pub, \
44 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_ctl_cli, \
45 _cli), \
46 &_bt_mesh_light_ctl_cli_cb)
47
57 void (*const ctl_status)(struct bt_mesh_light_ctl_cli *cli,
58 struct bt_mesh_msg_ctx *ctx,
59 const struct bt_mesh_light_ctl_status *status);
60
68 void (*const temp_status)(
69 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
70 const struct bt_mesh_light_temp_status *status);
71
78 void (*const default_status)(
79 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
80 const struct bt_mesh_light_ctl *status);
81
88 void (*const temp_range_status)(
89 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
90 const struct bt_mesh_light_temp_range_status *status);
91};
92
99 const struct bt_mesh_model *model;
101 struct bt_mesh_model_pub pub;
102 /* Publication buffer */
103 struct net_buf_simple pub_buf;
104 /* Publication data */
105 uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(
106 BT_MESH_LIGHT_CTL_SET, BT_MESH_LIGHT_CTL_MSG_MAXLEN_SET)];
108 struct bt_mesh_msg_ack_ctx ack_ctx;
110 uint8_t tid;
113};
114
133 struct bt_mesh_msg_ctx *ctx,
134 struct bt_mesh_light_ctl_status *rsp);
135
155 struct bt_mesh_msg_ctx *ctx,
156 const struct bt_mesh_light_ctl_set *set,
157 struct bt_mesh_light_ctl_status *rsp);
158
172 struct bt_mesh_msg_ctx *ctx,
173 const struct bt_mesh_light_ctl_set *set);
174
198 struct bt_mesh_msg_ctx *ctx,
199 struct bt_mesh_light_temp_status *rsp);
200
225 struct bt_mesh_msg_ctx *ctx,
226 const struct bt_mesh_light_temp_set *set,
227 struct bt_mesh_light_temp_status *rsp);
228
248 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
249 const struct bt_mesh_light_temp_set *set);
250
269 struct bt_mesh_msg_ctx *ctx,
270 struct bt_mesh_light_ctl *rsp);
271
291 struct bt_mesh_msg_ctx *ctx,
292 const struct bt_mesh_light_ctl *set,
293 struct bt_mesh_light_ctl *rsp);
294
309 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
310 const struct bt_mesh_light_ctl *set);
311
330 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
332
352 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
353 const struct bt_mesh_light_temp_range *set,
355
370 struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx,
371 const struct bt_mesh_light_temp_range *set);
372
374extern const struct bt_mesh_model_op _bt_mesh_light_ctl_cli_op[];
375extern const struct bt_mesh_model_cb _bt_mesh_light_ctl_cli_cb;
378#ifdef __cplusplus
379}
380#endif
381
382#endif /* BT_MESH_LIGHT_CTL_CLI_H__ */
383
int bt_mesh_light_ctl_default_set(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_ctl *set, struct bt_mesh_light_ctl *rsp)
Set the default CTL value of the server.
int bt_mesh_light_ctl_get(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_ctl_status *rsp)
Get the Light CTL state of the bound server.
int bt_mesh_light_ctl_default_set_unack(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_ctl *set)
Set the default CTL value of the server without requesting a response.
int bt_mesh_light_temp_range_get(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_temp_range_status *rsp)
Get the Light CTL Range state of the bound server.
int bt_mesh_light_temp_range_set_unack(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_range *set)
Set the CTL Range of the server without requesting a response.
int bt_mesh_light_temp_set_unack(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_set *set)
Set the CTL Temperature state of the server without requesting a response.
int bt_mesh_light_ctl_set_unack(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_ctl_set *set)
Set the CTL state of the server without requesting a response.
int bt_mesh_light_temp_range_set(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_range *set, struct bt_mesh_light_temp_range_status *rsp)
Set the CTL Range of the server.
int bt_mesh_light_ctl_default_get(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_ctl *rsp)
Get the default CTL value of the bound server.
int bt_mesh_light_temp_get(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_temp_status *rsp)
Get the Light CTL Temperature state of the bound server.
void(*const temp_range_status)(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_range_status *status)
CTL Range status message handler.
Definition: light_ctl_cli.h:88
void(*const default_status)(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_ctl *status)
Default parameter status message handler.
Definition: light_ctl_cli.h:78
void(*const ctl_status)(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_ctl_status *status)
CTL status message handler.
Definition: light_ctl_cli.h:57
void(*const temp_status)(struct bt_mesh_light_ctl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_status *status)
CTL Temperature status message handler.
Definition: light_ctl_cli.h:68
Definition: light_ctl_cli.h:49
uint8_t tid
Definition: light_ctl_cli.h:110
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: light_ctl_cli.h:108
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_CTL_SET, BT_MESH_LIGHT_CTL_MSG_MAXLEN_SET)]
Definition: light_ctl_cli.h:106
struct net_buf_simple pub_buf
Definition: light_ctl_cli.h:103
struct bt_mesh_model_pub pub
Definition: light_ctl_cli.h:101
const struct bt_mesh_model * model
Definition: light_ctl_cli.h:99
const struct bt_mesh_light_ctl_cli_handlers * handlers
Definition: light_ctl_cli.h:112
Definition: light_ctl_cli.h:97
Definition: light_ctl.h:50
Definition: light_ctl.h:64
Definition: light_ctl.h:32
Definition: light_ctl.h:110
Definition: light_ctl.h:102
Definition: light_ctl.h:78
Definition: light_ctl.h:92