MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_ble_mesh_light_cli.h
Go to the documentation of this file.
1
11
12#ifndef MESHX_BLE_MESH_LIGHT_CLI_H
13#define MESHX_BLE_MESH_LIGHT_CLI_H
14
16#include "meshx_control_task.h"
17
19
32
36
38typedef struct {
39 bool op_en;
40 uint16_t lightness;
41 uint8_t tid;
42 uint8_t trans_time;
43 uint8_t delay;
45
47typedef struct {
48 bool op_en;
49 uint16_t lightness;
50 uint8_t tid;
51 uint8_t trans_time;
52 uint8_t delay;
54
56typedef struct {
57 uint16_t lightness;
59
61typedef struct {
62 uint16_t range_min;
63 uint16_t range_max;
65
67typedef struct {
68 bool op_en;
69 uint16_t ctl_lightness;
70 uint16_t ctl_temperature;
71 int16_t ctl_delta_uv;
72 uint8_t tid;
73 uint8_t trans_time;
74 uint8_t delay;
76
78typedef struct {
79 bool op_en;
80 uint16_t ctl_temperature;
81 int16_t ctl_delta_uv;
82 uint8_t tid;
83 uint8_t trans_time;
84 uint8_t delay;
86
88typedef struct {
89 uint16_t range_min;
90 uint16_t range_max;
92
94typedef struct {
95 uint16_t lightness;
96 uint16_t temperature;
97 int16_t delta_uv;
99
101typedef struct {
102 bool op_en;
103 uint16_t hsl_lightness;
104 uint16_t hsl_hue;
105 uint16_t hsl_saturation;
106 uint8_t tid;
107 uint8_t trans_time;
108 uint8_t delay;
110
112typedef struct {
113 bool op_en;
114 uint16_t hue;
115 uint8_t tid;
116 uint8_t trans_time;
117 uint8_t delay;
119
121typedef struct {
122 bool op_en;
123 uint16_t saturation;
124 uint8_t tid;
125 uint8_t trans_time;
126 uint8_t delay;
128
130typedef struct {
131 uint16_t lightness;
132 uint16_t hue;
133 uint16_t saturation;
135
143
145typedef struct {
146 bool op_en;
147 uint16_t xyl_lightness;
148 uint16_t xyl_x;
149 uint16_t xyl_y;
150 uint8_t tid;
151 uint8_t trans_time;
152 uint8_t delay;
154
156typedef struct {
157 uint16_t lightness;
158 uint16_t xyl_x;
159 uint16_t xyl_y;
161
169
171typedef struct {
172 uint8_t mode;
174
176typedef struct {
177 uint8_t mode;
179
181typedef struct {
182 bool op_en;
183 uint8_t light_onoff;
184 uint8_t tid;
185 uint8_t trans_time;
186 uint8_t delay;
188
190typedef struct {
191 uint16_t property_id;
193
195typedef struct {
196 uint16_t property_id;
197 struct net_buf_simple *property_value;
199
206
232
236
244
252
257
262
264typedef struct {
265 uint8_t status_code;
266 uint16_t range_min;
267 uint16_t range_max;
269
279
289
296
298typedef struct {
299 uint16_t lightness;
300 uint16_t temperature;
301 int16_t delta_uv;
303
305typedef struct {
306 bool op_en;
307 uint16_t hsl_lightness;
308 uint16_t hsl_hue;
309 uint16_t hsl_saturation;
310 uint8_t remain_time;
312
321
323typedef struct {
324 bool op_en;
325 uint16_t present_hue;
326 uint16_t target_hue;
327 uint8_t remain_time;
329
337
339typedef struct {
340 uint16_t lightness;
341 uint16_t hue;
342 uint16_t saturation;
344
353
355typedef struct {
356 bool op_en;
357 uint16_t xyl_lightness;
358 uint16_t xyl_x;
359 uint16_t xyl_y;
360 uint8_t remain_time;
362
371
373typedef struct {
374 uint16_t lightness;
375 uint16_t xyl_x;
376 uint16_t xyl_y;
378
387
389typedef struct {
390 uint8_t mode;
392
394typedef struct {
395 uint8_t mode;
397
405
407typedef struct {
408 uint16_t property_id;
409 struct net_buf_simple *property_value;
411
438
457
467
482
495
514 uint16_t opcode, uint16_t addr,
515 uint16_t net_idx, uint16_t app_idx,
516 bool is_get_opcode
517);
518
519#endif /* MESHX_BLE_MESH_LIGHT_CLI_H */
Common BLE Mesh interface definitions and utility functions.
struct meshx_model meshx_model_t
struct meshx_ctx meshx_ctx_t
Structure to hold context information for BLE Mesh operations.
void * meshx_ptr_t
#define MESHX_BIT(nr)
meshx_err_t meshx_plat_light_client_send_msg(meshx_ptr_t p_model, meshx_light_client_set_state_t *p_set, uint16_t opcode, uint16_t addr, uint16_t net_idx, uint16_t app_idx, bool is_get_opcode)
Sends a Light Client message over BLE Mesh.
meshx_err_t meshx_plat_light_client_delete(meshx_ptr_t *p_pub, meshx_ptr_t *p_cli)
Deletes the Light client instance and its associated publication context.
struct meshx_gen_light_cli_cb_param meshx_gen_light_cli_cb_param_t
Callback parameters for Generic Light Client Model events. This structure is used to pass information...
control_task_msg_handle_t meshx_gen_light_client_cb_t
meshx_gen_light_cli_evt_t
@ MESHX_GEN_LIGHT_CLI_PUBLISH
@ MESHX_GEN_LIGHT_CLI_EVT_ALL
@ MESHX_GEN_LIGHT_CLI_EVT_GET
@ MESHX_GEN_LIGHT_CLI_EVT_SET
@ MESHX_GEN_LIGHT_CLI_TIMEOUT
meshx_err_t meshx_plat_gen_light_client_init(void)
Initialize the Generic Light Client Model. This function sets up the necessary parameters and resourc...
meshx_err_t meshx_plat_light_ctl_client_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_light_ctl_cli)
Creates and initializes a Light CTL (Color Temperature Light) client model instance.
Header file for the control task in the BLE mesh node application.
meshx_err_t(* control_task_msg_handle_t)(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Function pointer type for control task message handler.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Callback parameters for Generic Light Client Model events. This structure is used to pass information...
meshx_gen_light_client_status_cb_t status
Bluetooth Mesh Light Lightness Client Model Get and Set parameters structure.
Bluetooth Mesh Light Lightness Client Model Get and Set callback parameters structure.
meshx_light_ctl_temperature_range_status_cb_t ctl_temperature_range_status
meshx_light_lc_mode_status_cb_t lc_mode_status
meshx_light_lightness_last_status_cb_t lightness_last_status
meshx_light_xyl_default_status_cb_t xyl_default_status
meshx_light_lightness_range_status_cb_t lightness_range_status
meshx_light_lightness_status_cb_t lightness_status
meshx_light_xyl_range_status_cb_t xyl_range_status
meshx_light_xyl_target_status_cb_t xyl_target_status
meshx_light_lightness_default_status_cb_t lightness_default_status
meshx_light_hsl_hue_status_cb_t hsl_hue_status
meshx_light_hsl_default_status_cb_t hsl_default_status
meshx_light_lc_property_status_cb_t lc_property_status
meshx_light_lc_om_status_cb_t lc_om_status
meshx_light_ctl_temperature_status_cb_t ctl_temperature_status
meshx_light_lc_light_onoff_status_cb_t lc_light_onoff_status
meshx_light_hsl_range_status_cb_t hsl_range_status
meshx_light_hsl_saturation_status_cb_t hsl_saturation_status
meshx_light_ctl_default_status_cb_t ctl_default_status
meshx_light_lightness_linear_status_cb_t lightness_linear_status
meshx_light_hsl_target_status_cb_t hsl_target_status
Lighting Client Model get message union.
meshx_light_lc_property_get_t lc_property_get
Lighting Client Model set message union.
meshx_light_lightness_set_t lightness_set
meshx_light_hsl_range_set_t hsl_range_set
meshx_light_xyl_default_set_t xyl_default_set
meshx_light_lc_property_set_t lc_property_set
meshx_light_hsl_saturation_set_t hsl_saturation_set
meshx_light_hsl_default_set_t hsl_default_set
meshx_light_lightness_range_set_t lightness_range_set
meshx_light_xyl_range_set_t xyl_range_set
meshx_light_lightness_default_set_t lightness_default_set
meshx_light_lc_light_onoff_set_t lc_light_onoff_set
meshx_light_ctl_temperature_range_set_t ctl_temperature_range_set
meshx_light_ctl_temperature_set_t ctl_temperature_set
meshx_light_lightness_linear_set_t lightness_linear_set
meshx_light_ctl_default_set_t ctl_default_set