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.
|
Header file for the MeshX BLE Mesh Light Server module. This file defines the data structures, function prototypes, and callback parameters for managing the Light Server models in a BLE Mesh network. It includes support for various lighting models such as Light CTL, HSL, xyL, and LC. More...
Go to the source code of this file.
Typedefs | |
typedef struct meshx_lighting_server_cb_param | meshx_lighting_server_cb_param_t |
typedef struct meshx_light_ctl_srv_state | meshx_light_ctl_srv_state_t |
typedef struct meshx_light_ctl_srv | meshx_light_ctl_srv_t |
Structure representing the Light CTL Server model. | |
Functions | |
meshx_err_t | meshx_plat_light_srv_init (void) |
Initialize the platform-specific Light Server. | |
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_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. | |
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. | |
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_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_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 containing the current state of the Light Server. | |
Header file for the MeshX BLE Mesh Light Server module. This file defines the data structures, function prototypes, and callback parameters for managing the Light Server models in a BLE Mesh network. It includes support for various lighting models such as Light CTL, HSL, xyL, and LC.
Copyright (c) 2024 - 2025 MeshX
Definition in file meshx_ble_mesh_light_srv.h.
typedef struct meshx_light_ctl_srv_state meshx_light_ctl_srv_state_t |
typedef struct meshx_light_ctl_srv meshx_light_ctl_srv_t |
Structure representing the Light CTL Server model.
This structure contains the model and state information for the Light CTL Server.
typedef struct meshx_lighting_server_cb_param meshx_lighting_server_cb_param_t |
Lighting Server Model callback parameters
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 containing the current state of the Light Server.
[in] | p_model | Pointer to the Light Server model. |
[in] | p_ctx | Pointer to the context containing message information. |
[in] | state_change | The state change data to be sent in the status message. |
Definition at line 194 of file esp_light_srv_model.c.
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.
This function sets up the Light CTL Setup Server for a given model, configuring publication and server context pointers.
[in] | p_model | Pointer to the parent model instance. |
[out] | p_pub | Pointer to the publication context to be initialized. |
[out] | p_ctl_srv | Pointer to the Light CTL Setup Server context to be initialized. |
Definition at line 293 of file esp_light_srv_model.c.
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.
This function initializes and allocates resources for a Light CTL Server model.
[in] | p_model | Pointer to the model instance. |
[out] | p_pub | Pointer to the publication context. |
[out] | p_ctl_srv | Pointer to the Light CTL Server instance. |
Definition at line 333 of file esp_light_srv_model.c.
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.
This function restores the state of the Light CTL Server with the provided parameters.
[in] | p_model | Pointer to the model instance. |
[in] | delta_uv | Delta UV value. |
[in] | lightness | Lightness value. |
[in] | temperature | Temperature value. |
[in] | temp_range_max | Maximum temperature range. |
[in] | temp_range_min | Minimum temperature range. |
Definition at line 398 of file esp_light_srv_model.c.
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.
This function releases resources associated with a Light CTL Server model.
[in,out] | p_pub | Pointer to the publication context to be deleted. |
[in,out] | p_ctl_srv | Pointer to the Light CTL Server instance to be deleted. |
Definition at line 277 of file esp_light_srv_model.c.
meshx_err_t meshx_plat_light_srv_init | ( | void | ) |
Initialize the platform-specific Light Server.
This function sets up the necessary resources for the Light Server.
Definition at line 263 of file esp_light_srv_model.c.
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.
This function updates the state of the Light CTL Server with the provided parameters.
[in] | p_model | Pointer to the model instance. |
[in] | delta_uv | Delta UV value. |
[in] | lightness | Lightness value. |
[in] | temperature | Temperature value. |
[in] | temp_range_max | Maximum temperature range. |
[in] | temp_range_min | Minimum temperature range. |
Definition at line 377 of file esp_light_srv_model.c.