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.
|
Implementation of the CW-WW (Cool White - Warm White) client model for BLE Mesh. More...
#include "meshx_common.h"
#include "meshx_control_task.h"
#include "meshx_onoff_client.h"
#include "meshx_light_ctl_client.h"
Go to the source code of this file.
Data Structures | |
struct | cwww_cli_ctx |
Structure to hold the context of the cwww client. More... | |
struct | cwww_client_msg |
Structure to hold the cwww client message sent from APP layer. More... | |
struct | cwww_client_element |
Structure to hold the cwww client element. More... | |
struct | cwww_client_element_ctrl |
Structure to hold the cwww client elements. More... | |
Typedefs | |
typedef struct cwww_cli_ctx | meshx_cwww_client_model_ctx_t |
Structure to hold the context of the cwww client. | |
typedef struct cwww_client_msg | meshx_cwww_client_msg_t |
Structure to hold the cwww client message sent from APP layer. | |
typedef struct cwww_client_element | meshx_cwww_client_elements_t |
Structure to hold the cwww client element. | |
typedef struct cwww_client_element_ctrl | meshx_cwww_client_elements_ctrl_t |
Structure to hold the cwww client elements. | |
Enumerations | |
enum | cwww_cli_sig_id_t { CWWW_CLI_SIG_ONOFF_MODEL_ID , CWWW_CLI_SIG_L_CTL_MODEL_ID , CWWW_CLI_SIG_ID_MAX } |
Enumeration of CW-WW SIG model IDs. More... | |
Functions | |
meshx_err_t | meshx_cwww_el_get_state (uint16_t element_id, cwww_cli_sig_id_t model_id) |
Retrieves the current state of the CW/WW (Cool White/Warm White) light element for the specified element ID. | |
meshx_err_t | create_cwww_client_elements (dev_struct_t *pdev, uint16_t element_cnt) |
Create Dynamic CW-WW Model Elements. | |
Implementation of the CW-WW (Cool White - Warm White) client model for BLE Mesh.
Copyright © 2024 - 2025 MeshX
Definition in file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_ALL (CWWW_ARG_BMAP_ONOFF_SET | CWWW_ARG_BMAP_CTL_SET | CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET) |
Argument bitmap for setting all CW-WW client states.
Definition at line 78 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_CTL_SET (CWWW_ARG_BMAP_LIGHTNESS_SET | CWWW_ARG_BMAP_TEMPERATURE_SET | CWWW_ARG_BMAP_DELTA_UV_SET) |
Argument bitmap for setting the CW-WW client control state.
Definition at line 72 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_DELTA_UV_SET MESHX_BIT(3) |
Definition at line 58 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_LIGHTNESS_SET MESHX_BIT(1) |
Definition at line 56 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_ONOFF_SET MESHX_BIT(0) |
Definition at line 55 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET (CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET_MIN | CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET_MAX) |
Argument bitmap for setting the temperature range.
Definition at line 66 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET_MAX MESHX_BIT(5) |
Definition at line 60 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_TEMPERATURE_RANGE_SET_MIN MESHX_BIT(4) |
Definition at line 59 of file meshx_light_cwww_client_element.h.
#define CWWW_ARG_BMAP_TEMPERATURE_SET MESHX_BIT(2) |
Definition at line 57 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MODEL_SIG_CNT CWWW_CLI_SIG_ID_MAX |
Number of SIG models in a CW-WW model element.
Definition at line 23 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MODEL_VEN_CNT 0 |
Number of Vendor models in a CW-WW model element.
Definition at line 29 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MSG_ACK 1 |
Acknowledgment message type.
Definition at line 47 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MSG_GET 1 |
Message type for getting CW-WW client state.
Definition at line 41 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MSG_NO_ACK 0 |
Non-acknowledgment message type.
Definition at line 53 of file meshx_light_cwww_client_element.h.
#define CWWW_CLI_MSG_SET 0 |
Message type for setting CW-WW client state.
Definition at line 35 of file meshx_light_cwww_client_element.h.
typedef struct cwww_client_element_ctrl meshx_cwww_client_elements_ctrl_t |
Structure to hold the cwww client elements.
typedef struct cwww_client_element meshx_cwww_client_elements_t |
Structure to hold the cwww client element.
typedef struct cwww_cli_ctx meshx_cwww_client_model_ctx_t |
Structure to hold the context of the cwww client.
typedef struct cwww_client_msg meshx_cwww_client_msg_t |
Structure to hold the cwww client message sent from APP layer.
enum cwww_cli_sig_id_t |
Enumeration of CW-WW SIG model IDs.
Enumerator | |
---|---|
CWWW_CLI_SIG_ONOFF_MODEL_ID | On/Off model ID |
CWWW_CLI_SIG_L_CTL_MODEL_ID | Light CTL model ID |
CWWW_CLI_SIG_ID_MAX | Maximum number of model IDs |
Definition at line 83 of file meshx_light_cwww_client_element.h.
meshx_err_t create_cwww_client_elements | ( | dev_struct_t * | pdev, |
uint16_t | element_cnt ) |
Create Dynamic CW-WW Model Elements.
[in] | pdev | Pointer to device structure |
[in] | element_cnt | Maximum number of CW-WW models |
Definition at line 998 of file meshx_light_cwww_client.c.
meshx_err_t meshx_cwww_el_get_state | ( | uint16_t | element_id, |
cwww_cli_sig_id_t | model_id ) |
Retrieves the current state of the CW/WW (Cool White/Warm White) light element for the specified element ID.
This function queries the state of a light element identified by the given element_id.
[in] | element_id | The unique identifier of the light element whose state is to be retrieved. |
[in] | model_id | The model ID to specify which model's state to retrieve. If set to CWWW_CLI_SIG_ID_MAX, it retrieves the state for all models. |
Definition at line 931 of file meshx_light_cwww_client.c.