nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
light_ctl.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_H__
15#define BT_MESH_LIGHT_CTL_H__
16
17#include <zephyr/bluetooth/mesh.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25#define BT_MESH_LIGHT_TEMP_MIN 800
27#define BT_MESH_LIGHT_TEMP_MAX 20000
29#define BT_MESH_LIGHT_TEMP_UNKNOWN 0xFFFF
30
34 uint16_t light;
36 uint16_t temp;
38 int16_t delta_uv;
39};
40
44 uint16_t temp;
46 int16_t delta_uv;
47};
48
61};
62
66 uint16_t current_light;
68 uint16_t current_temp;
70 uint16_t target_light;
72 uint16_t target_temp;
75};
76
89};
90
99};
100
104 uint16_t min;
106 uint16_t max;
107};
108
115};
116
118#define BT_MESH_LIGHT_CTL_GET BT_MESH_MODEL_OP_2(0x82, 0x5D)
119#define BT_MESH_LIGHT_CTL_SET BT_MESH_MODEL_OP_2(0x82, 0x5E)
120#define BT_MESH_LIGHT_CTL_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x5F)
121#define BT_MESH_LIGHT_CTL_STATUS BT_MESH_MODEL_OP_2(0x82, 0x60)
122#define BT_MESH_LIGHT_TEMP_GET BT_MESH_MODEL_OP_2(0x82, 0x61)
123#define BT_MESH_LIGHT_TEMP_RANGE_GET BT_MESH_MODEL_OP_2(0x82, 0x62)
124#define BT_MESH_LIGHT_TEMP_RANGE_STATUS BT_MESH_MODEL_OP_2(0x82, 0x63)
125#define BT_MESH_LIGHT_TEMP_SET BT_MESH_MODEL_OP_2(0x82, 0x64)
126#define BT_MESH_LIGHT_TEMP_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x65)
127#define BT_MESH_LIGHT_TEMP_STATUS BT_MESH_MODEL_OP_2(0x82, 0x66)
128#define BT_MESH_LIGHT_CTL_DEFAULT_GET BT_MESH_MODEL_OP_2(0x82, 0x67)
129#define BT_MESH_LIGHT_CTL_DEFAULT_STATUS BT_MESH_MODEL_OP_2(0x82, 0x68)
130#define BT_MESH_LIGHT_CTL_DEFAULT_SET BT_MESH_MODEL_OP_2(0x82, 0x69)
131#define BT_MESH_LIGHT_CTL_DEFAULT_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x6A)
132#define BT_MESH_LIGHT_TEMP_RANGE_SET BT_MESH_MODEL_OP_2(0x82, 0x6B)
133#define BT_MESH_LIGHT_TEMP_RANGE_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x6C)
134
135#define BT_MESH_LIGHT_CTL_MSG_LEN_GET 0
136#define BT_MESH_LIGHT_CTL_MSG_MINLEN_SET 7
137#define BT_MESH_LIGHT_CTL_MSG_MAXLEN_SET 9
138#define BT_MESH_LIGHT_CTL_MSG_MINLEN_STATUS 4
139#define BT_MESH_LIGHT_CTL_MSG_MAXLEN_STATUS 9
140#define BT_MESH_LIGHT_CTL_MSG_LEN_TEMP_RANGE_STATUS 5
141#define BT_MESH_LIGHT_CTL_MSG_MINLEN_TEMP_SET 5
142#define BT_MESH_LIGHT_CTL_MSG_MAXLEN_TEMP_SET 7
143#define BT_MESH_LIGHT_CTL_MSG_MINLEN_TEMP_STATUS 4
144#define BT_MESH_LIGHT_CTL_MSG_MAXLEN_TEMP_STATUS 9
145#define BT_MESH_LIGHT_CTL_MSG_LEN_DEFAULT_MSG 6
146#define BT_MESH_LIGHT_CTL_MSG_LEN_TEMP_RANGE_SET 4
149#ifdef __cplusplus
150}
151#endif
152
153#endif /* BT_MESH_LIGHT_CTL_H__ */
154
bt_mesh_model_status
Definition: model_types.h:54
struct bt_mesh_light_ctl params
Definition: light_ctl.h:52
const struct bt_mesh_model_transition * transition
Definition: light_ctl.h:60
Definition: light_ctl.h:50
uint16_t target_light
Definition: light_ctl.h:70
uint32_t remaining_time
Definition: light_ctl.h:74
uint16_t current_light
Definition: light_ctl.h:66
uint16_t target_temp
Definition: light_ctl.h:72
uint16_t current_temp
Definition: light_ctl.h:68
Definition: light_ctl.h:64
uint16_t light
Definition: light_ctl.h:34
uint16_t temp
Definition: light_ctl.h:36
int16_t delta_uv
Definition: light_ctl.h:38
Definition: light_ctl.h:32
struct bt_mesh_light_temp_range range
Definition: light_ctl.h:114
enum bt_mesh_model_status status
Definition: light_ctl.h:112
Definition: light_ctl.h:110
uint16_t max
Definition: light_ctl.h:106
uint16_t min
Definition: light_ctl.h:104
Definition: light_ctl.h:102
struct bt_mesh_light_temp params
Definition: light_ctl.h:80
const struct bt_mesh_model_transition * transition
Definition: light_ctl.h:88
Definition: light_ctl.h:78
struct bt_mesh_light_temp current
Definition: light_ctl.h:94
uint32_t remaining_time
Definition: light_ctl.h:98
struct bt_mesh_light_temp target
Definition: light_ctl.h:96
Definition: light_ctl.h:92
uint16_t temp
Definition: light_ctl.h:44
int16_t delta_uv
Definition: light_ctl.h:46
Definition: light_ctl.h:42
Definition: model_types.h:37