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_srv.h
Go to the documentation of this file.
1
19
20#ifndef __MESHX_BLE_MESH_LIGHT_SRV_H__
21#define __MESHX_BLE_MESH_LIGHT_SRV_H__
22
24#include "meshx_control_task.h"
25
31
37
43
50
52typedef struct
53{
54 uint16_t lightness;
55 uint16_t temperature;
56 int16_t delta_uv;
58
65
72
74typedef struct
75{
76 uint16_t lightness;
77 uint16_t temperature;
78 int16_t delta_uv;
80
82typedef struct
83{
84 uint16_t lightness;
85 uint16_t hue;
86 uint16_t saturation;
88
90typedef struct
91{
92 uint16_t hue;
94
100
102typedef struct
103{
104 uint16_t lightness;
105 uint16_t hue;
106 uint16_t saturation;
108
117
119typedef struct
120{
121 uint16_t lightness;
122 uint16_t x;
123 uint16_t y;
125
127typedef struct
128{
129 uint16_t lightness;
130 uint16_t x;
131 uint16_t y;
133
135typedef struct
136{
137 uint16_t x_range_min;
138 uint16_t x_range_max;
139 uint16_t y_range_min;
140 uint16_t y_range_max;
142
144typedef struct
145{
146 uint8_t mode;
148
150typedef struct
151{
152 uint8_t mode;
154
160
162typedef struct
163{
164 uint16_t property_id;
165 struct net_buf_simple *property_value;
167
169typedef struct
170{
171 uint16_t property_id;
173 union
174 {
175 uint8_t occupancy;
178 } state;
180
211
219
239
250
261
276
291
305
323 uint16_t delta_uv,
324 uint16_t lightness,
325 uint16_t temperature,
326 uint16_t temp_range_max,
327 uint16_t temp_range_min);
328
346 uint16_t delta_uv,
347 uint16_t lightness,
348 uint16_t temperature,
349 uint16_t temp_range_max,
350 uint16_t temp_range_min);
351
364 const meshx_ctx_t *p_ctx,
365 const meshx_lighting_server_state_change_t *state_change);
366
367#endif /* __MESHX_BLE_MESH_LIGHT_SRV_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
meshx_err_t meshx_plat_light_ctl_setup_srv_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_ctl_srv)
Creates and initializes a Light CTL (Color Temperature Lightness) Setup Server model instance.
meshx_err_t meshx_plat_set_light_ctl_srv_state(meshx_ptr_t p_model, uint16_t delta_uv, uint16_t lightness, uint16_t temperature, uint16_t temp_range_max, uint16_t temp_range_min)
Set the state of the Light CTL Server.
meshx_err_t meshx_plat_light_srv_delete(meshx_ptr_t *p_pub, meshx_ptr_t *p_ctl_srv)
Delete a Light CTL Server instance.
struct meshx_light_ctl_srv_state meshx_light_ctl_srv_state_t
struct meshx_light_ctl_srv meshx_light_ctl_srv_t
Structure representing the Light CTL Server model.
meshx_err_t meshx_plat_light_ctl_srv_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_ctl_srv)
Create a Light CTL Server instance.
struct meshx_lighting_server_cb_param meshx_lighting_server_cb_param_t
meshx_err_t meshx_plat_gen_light_srv_send_status(const meshx_model_t *p_model, const meshx_ctx_t *p_ctx, const meshx_lighting_server_state_change_t *state_change)
Send a status message from the Light Server. This function constructs and sends a status message cont...
meshx_err_t meshx_plat_light_ctl_srv_restore(meshx_ptr_t p_model, uint16_t delta_uv, uint16_t lightness, uint16_t temperature, uint16_t temp_range_max, uint16_t temp_range_min)
Restore the state of the Light CTL Server.
meshx_err_t meshx_plat_light_srv_init(void)
Initialize the platform-specific Light Server.
Header file for the control task in the BLE mesh node application.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Structure representing the Light CTL Server model.
meshx_light_ctl_srv_state_t state
meshx_lighting_server_state_change_t state_change
Lighting Server Model state change value union.
meshx_state_change_light_hsl_range_set_t hsl_range_set
meshx_state_change_light_lc_property_set_t lc_property_set
meshx_state_change_light_ctl_temperature_set_t ctl_temp_set
meshx_state_change_light_xyl_default_set_t xyl_default_set
meshx_state_change_light_ctl_default_set_t ctl_default_set
meshx_state_change_light_lightness_linear_set_t lightness_linear_set
meshx_state_change_light_hsl_hue_set_t hsl_hue_set
meshx_state_change_light_lightness_default_set_t lightness_default_set
meshx_state_change_light_lc_mode_set_t lc_mode_set
meshx_state_change_light_lc_light_onoff_set_t lc_light_onoff_set
meshx_state_change_light_lightness_set_t lightness_set
meshx_state_change_light_xyl_set_t xyl_set
meshx_state_change_light_hsl_default_set_t hsl_default_set
meshx_state_change_light_xyl_range_set_t xyl_range_set
meshx_state_change_sensor_status_t sensor_status
meshx_state_change_light_hsl_saturation_set_t hsl_saturation_set
meshx_state_change_light_lc_om_set_t lc_om_set
meshx_state_change_light_ctl_temperature_range_set_t ctl_temp_range_set
meshx_state_change_light_lightness_range_set_t lightness_range_set
meshx_state_change_light_hsl_set_t hsl_set
meshx_state_change_light_ctl_set_t ctl_set