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 BLE Mesh Light Client functionality in the MeshX framework. This file contains declarations and includes required for implementing BLE Mesh Light Client operations. More...
Go to the source code of this file.
Typedefs | |
typedef control_task_msg_handle_t | meshx_gen_light_client_cb_t |
typedef 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 about the received messages and their context to the application. It includes the context, model pointer, event type, and status values. The status values are encapsulated in a union to handle different types of status messages that the Generic Light Client Model can receive. Each status type corresponds to a specific operation code (opcode) defined in the BLE Mesh specification, allowing the application to handle them appropriately. | |
Enumerations | |
enum | meshx_gen_light_cli_evt_t { MESHX_GEN_LIGHT_CLI_EVT_GET = MESHX_BIT(0) , MESHX_GEN_LIGHT_CLI_EVT_SET = MESHX_BIT(1) , MESHX_GEN_LIGHT_CLI_PUBLISH = MESHX_BIT(2) , MESHX_GEN_LIGHT_CLI_TIMEOUT = MESHX_BIT(3) , MESHX_GEN_LIGHT_CLI_EVT_ALL } |
Functions | |
meshx_err_t | meshx_plat_gen_light_client_init (void) |
Initialize the Generic Light Client Model. This function sets up the necessary parameters and resources for the Generic Light Client Model to operate correctly. | |
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. | |
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. | |
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. | |
Header file for BLE Mesh Light Client functionality in the MeshX framework. This file contains declarations and includes required for implementing BLE Mesh Light Client operations.
Copyright (c) 2024 - 2025 MeshX
Definition in file meshx_ble_mesh_light_cli.h.
typedef 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 about the received messages and their context to the application. It includes the context, model pointer, event type, and status values. The status values are encapsulated in a union to handle different types of status messages that the Generic Light Client Model can receive. Each status type corresponds to a specific operation code (opcode) defined in the BLE Mesh specification, allowing the application to handle them appropriately.
Definition at line 18 of file meshx_ble_mesh_light_cli.h.
Definition at line 20 of file meshx_ble_mesh_light_cli.h.
meshx_err_t meshx_plat_gen_light_client_init | ( | void | ) |
Initialize the Generic Light Client Model. This function sets up the necessary parameters and resources for the Generic Light Client Model to operate correctly.
Definition at line 114 of file esp_gen_light_cli_model.c.
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.
This function is responsible for cleaning up and freeing resources associated with the Light client model, including its publication context.
[in] | p_pub | Pointer to the publication context to be deleted. |
[in] | p_cli | Pointer to the client instance to be deleted. |
Definition at line 168 of file esp_gen_light_cli_model.c.
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.
This function constructs and sends a Light Client message using the specified model, set state parameters, opcode, destination address, network index, and application index.
[in] | p_model | Pointer to the BLE Mesh model instance. |
[in] | p_set | Pointer to the structure containing the light client set state parameters. |
[in] | opcode | Opcode of the message to be sent. |
[in] | addr | Destination address for the message. |
[in] | net_idx | Network index to be used for sending the message. |
[in] | app_idx | Application index to be used for sending the message. |
[in] | is_get_opcode | Indicates whether the opcode is a GET type (true) or SET type (false). |
Definition at line 195 of file esp_gen_light_cli_model.c.
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.
This function sets up the Light CTL client model for use in the BLE Mesh network. It associates the client model with the provided model pointer and optionally sets up publication and client context pointers.
[in] | p_model | Pointer to the mesh model structure to associate with the Light CTL client. |
[out] | p_pub | Pointer to a publication context pointer to be initialized (can be NULL if not used). |
[out] | p_light_ctl_cli | Pointer to a Light CTL client context pointer to be initialized. |
Definition at line 144 of file esp_gen_light_cli_model.c.