nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
light_hsl_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_HSL_CLI_H__
15#define BT_MESH_LIGHT_HSL_CLI_H__
16
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25
32#define BT_MESH_MODEL_LIGHT_HSL_CLI(_cli) \
33 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_HSL_CLI, \
34 _bt_mesh_light_hsl_cli_op, &(_cli)->pub, \
35 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_hsl_cli, \
36 _cli), \
37 &_bt_mesh_light_hsl_cli_cb)
38
48 void (*const status)(struct bt_mesh_light_hsl_cli *cli,
49 struct bt_mesh_msg_ctx *ctx,
50 const struct bt_mesh_light_hsl_status *status);
51
59 void (*const target_status)(
60 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
61 const struct bt_mesh_light_hsl_status *status);
62
69 void (*const default_status)(
70 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
71 const struct bt_mesh_light_hsl *status);
72
79 void (*const range_status)(
80 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
82
90 void (*const hue_status)(
91 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
92 const struct bt_mesh_light_hue_status *status);
93
101 void (*const saturation_status)(
102 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
103 const struct bt_mesh_light_sat_status *status);
104};
105
112
114 const struct bt_mesh_model *model;
116 struct bt_mesh_model_pub pub;
118 struct net_buf_simple buf;
120 uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(
121 BT_MESH_LIGHT_HSL_OP_SET, BT_MESH_LIGHT_HSL_MSG_MAXLEN_SET)];
123 struct bt_mesh_msg_ack_ctx ack_ctx;
125 uint8_t tid;
126};
127
146 struct bt_mesh_msg_ctx *ctx,
147 struct bt_mesh_light_hsl_status *rsp);
148
168 struct bt_mesh_msg_ctx *ctx,
169 const struct bt_mesh_light_hsl_params *set,
170 struct bt_mesh_light_hsl_status *rsp);
171
185 struct bt_mesh_msg_ctx *ctx,
186 const struct bt_mesh_light_hsl_params *set);
187
206 struct bt_mesh_msg_ctx *ctx,
207 struct bt_mesh_light_hsl_status *rsp);
208
227 struct bt_mesh_msg_ctx *ctx,
228 struct bt_mesh_light_hsl *rsp);
229
249 struct bt_mesh_msg_ctx *ctx,
250 const struct bt_mesh_light_hsl *set,
251 struct bt_mesh_light_hsl *rsp);
252
267 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
268 const struct bt_mesh_light_hsl *set);
269
288 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
290
310 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
311 const struct bt_mesh_light_hue_sat_range *set,
313
328 struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx,
329 const struct bt_mesh_light_hue_sat_range *set);
330
349 struct bt_mesh_msg_ctx *ctx,
350 struct bt_mesh_light_hue_status *rsp);
351
371 struct bt_mesh_msg_ctx *ctx,
372 const struct bt_mesh_light_hue *set,
373 struct bt_mesh_light_hue_status *rsp);
374
388 struct bt_mesh_msg_ctx *ctx,
389 const struct bt_mesh_light_hue *set);
390
409 struct bt_mesh_msg_ctx *ctx,
410 struct bt_mesh_light_sat_status *rsp);
411
431 struct bt_mesh_msg_ctx *ctx,
432 const struct bt_mesh_light_sat *set,
433 struct bt_mesh_light_sat_status *rsp);
434
449 struct bt_mesh_msg_ctx *ctx,
450 const struct bt_mesh_light_sat *set);
451
453extern const struct bt_mesh_model_op _bt_mesh_light_hsl_cli_op[];
454extern const struct bt_mesh_model_cb _bt_mesh_light_hsl_cli_cb;
457#ifdef __cplusplus
458}
459#endif
460
461#endif /* BT_MESH_LIGHT_HSL_CLI_H__ */
462
int bt_mesh_light_hsl_range_set_unack(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue_sat_range *set)
Set the Light HSL Range of the server without requesting a response.
int bt_mesh_light_hsl_range_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hsl_range_status *rsp)
Get the Light HSL Range state of the bound server.
int bt_mesh_light_hsl_set(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_params *set, struct bt_mesh_light_hsl_status *rsp)
Set the Light HSL state of the server.
int bt_mesh_light_hsl_target_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hsl_status *rsp)
Get the Light HSL target state of the bound server.
int bt_mesh_light_saturation_set(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_sat *set, struct bt_mesh_light_sat_status *rsp)
Set the Light Saturation state of the server.
int bt_mesh_light_hsl_default_set(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl *set, struct bt_mesh_light_hsl *rsp)
Set the default HSL value of the server.
int bt_mesh_light_hsl_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hsl_status *rsp)
Get the Light HSL state of the bound server.
int bt_mesh_light_hsl_default_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hsl *rsp)
Get the default HSL value of the bound server.
int bt_mesh_light_hsl_set_unack(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_params *set)
Set the Light HSL state of the server without requesting a response.
int bt_mesh_light_hue_set_unack(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue *set)
Set the Light Hue state of the server without requesting a response.
int bt_mesh_light_saturation_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_sat_status *rsp)
Get the Light Saturation state of the bound server.
int bt_mesh_light_hue_get(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hue_status *rsp)
Get the Light Hue state of the bound server.
int bt_mesh_light_hsl_default_set_unack(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl *set)
Set the default HSL value of the server without requesting a response.
int bt_mesh_light_hue_set(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue *set, struct bt_mesh_light_hue_status *rsp)
Set the Light Hue state of the server.
int bt_mesh_light_saturation_set_unack(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_sat *set)
Set the Light Saturation state of the server without requesting a response.
int bt_mesh_light_hsl_range_set(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue_sat_range *set, struct bt_mesh_light_hsl_range_status *rsp)
Set the Light HSL Range of the server.
void(*const hue_status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue_status *status)
Hue status message handler.
Definition: light_hsl_cli.h:90
void(*const saturation_status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_sat_status *status)
Saturation status message handler.
Definition: light_hsl_cli.h:101
void(*const status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_status *status)
HSL status message handler.
Definition: light_hsl_cli.h:48
void(*const range_status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_range_status *status)
Range status message handler.
Definition: light_hsl_cli.h:79
void(*const target_status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_status *status)
HSL target status message handler.
Definition: light_hsl_cli.h:59
void(*const default_status)(struct bt_mesh_light_hsl_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl *status)
Default parameter status message handler.
Definition: light_hsl_cli.h:69
Definition: light_hsl_cli.h:40
const struct bt_mesh_model * model
Definition: light_hsl_cli.h:114
struct net_buf_simple buf
Definition: light_hsl_cli.h:118
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_HSL_OP_SET, BT_MESH_LIGHT_HSL_MSG_MAXLEN_SET)]
Definition: light_hsl_cli.h:121
const struct bt_mesh_light_hsl_cli_handlers * handlers
Definition: light_hsl_cli.h:111
struct bt_mesh_model_pub pub
Definition: light_hsl_cli.h:116
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: light_hsl_cli.h:123
uint8_t tid
Definition: light_hsl_cli.h:125
Definition: light_hsl_cli.h:109
Definition: light_hsl.h:50
Definition: light_hsl.h:163
Definition: light_hsl.h:80
Definition: light_hsl.h:32
Definition: light_hsl.h:155
Definition: light_hsl.h:127
Definition: light_hsl.h:88
Definition: light_hsl.h:137
Definition: light_hsl.h:113