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 Generic Client functionality in the MeshX framework. This file contains declarations and includes required for implementing BLE Mesh Generic Client operations. More...
Go to the source code of this file.
Typedefs | |
typedef struct meshx_gen_cli_cb_param | meshx_gen_cli_cb_param_t |
Callback parameters for Generic 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 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. | |
typedef control_task_msg_handle_t | meshx_gen_client_cb_t |
Enumerations | |
enum | meshx_gen_cli_evt_t { MESHX_GEN_CLI_EVT_GET = MESHX_BIT(0) , MESHX_GEN_CLI_EVT_SET = MESHX_BIT(1) , MESHX_GEN_CLI_PUBLISH = MESHX_BIT(2) , MESHX_GEN_CLI_TIMEOUT = MESHX_BIT(3) , MESHX_GEN_CLI_EVT_ALL } |
Functions | |
meshx_err_t | meshx_plat_on_off_gen_cli_create (meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_onoff_cli) |
Creates a Generic OnOff client model and its publication context. | |
meshx_err_t | meshx_plat_gen_cli_delete (meshx_ptr_t *p_pub, meshx_ptr_t *p_cli) |
Deletes the Generic OnOff Client model and its associated resources. | |
meshx_err_t | meshx_plat_gen_cli_init (void) |
Initialize the meshxuction generic client. | |
meshx_err_t | meshx_plat_gen_cli_send_msg (meshx_ptr_t p_model, meshx_gen_cli_set_t *p_set, uint16_t opcode, uint16_t addr, uint16_t net_idx, uint16_t app_idx, bool is_get_opcode) |
Sends a Generic Client message over BLE Mesh. | |
Header file for BLE Mesh Generic Client functionality in the MeshX framework. This file contains declarations and includes required for implementing BLE Mesh Generic Client operations.
Copyright (c) 2024 - 2025 MeshX
Definition in file meshx_ble_mesh_gen_cli.h.
typedef struct meshx_gen_cli_cb_param meshx_gen_cli_cb_param_t |
Callback parameters for Generic 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 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 292 of file meshx_ble_mesh_gen_cli.h.
enum meshx_gen_cli_evt_t |
Definition at line 18 of file meshx_ble_mesh_gen_cli.h.
meshx_err_t meshx_plat_gen_cli_delete | ( | meshx_ptr_t * | p_pub, |
meshx_ptr_t * | p_cli ) |
Deletes the Generic OnOff Client model and its associated resources.
This function frees the memory allocated for the Generic OnOff Client and sets the pointer to NULL. It also deletes the model publication resources associated with the client.
[in,out] | p_pub | Pointer to the publication structure to be deleted. |
[in,out] | p_cli | Pointer to the OnOff Client structure to be freed. |
Definition at line 187 of file esp_gen_cli_model.c.
meshx_err_t meshx_plat_gen_cli_init | ( | void | ) |
Initialize the meshxuction generic client.
This function sets up the necessary configurations and initializes the meshxuction generic client for the BLE mesh node.
Definition at line 125 of file esp_gen_cli_model.c.
meshx_err_t meshx_plat_gen_cli_send_msg | ( | meshx_ptr_t | p_model, |
meshx_gen_cli_set_t * | p_set, | ||
uint16_t | opcode, | ||
uint16_t | addr, | ||
uint16_t | net_idx, | ||
uint16_t | app_idx, | ||
bool | is_get_opcode ) |
Sends a Generic Client message over BLE Mesh.
This function sends a message from a Generic Client model to a specified address within the BLE Mesh network, using the provided opcode and parameters.
[in] | p_model | Pointer to the Generic Client model instance. |
[in] | p_set | Pointer to the structure containing the message parameters to set. |
[in] | opcode | Operation code specifying the type of message to send. |
[in] | addr | Destination address within the BLE Mesh network. |
[in] | net_idx | Network index identifying the subnet to use. |
[in] | app_idx | Application key index to encrypt the message. |
[in] | is_get_opcode | Flag indicating if the opcode is a GET request. |
Definition at line 214 of file esp_gen_cli_model.c.
meshx_err_t meshx_plat_on_off_gen_cli_create | ( | meshx_ptr_t | p_model, |
meshx_ptr_t * | p_pub, | ||
meshx_ptr_t * | p_onoff_cli ) |
Creates a Generic OnOff client model and its publication context.
This function initializes the Generic OnOff client model, its publication context, and allocates memory for the client instance. It checks for invalid arguments and handles memory allocation failures.
[out] | p_model | Pointer to the model structure to be created. |
[out] | p_pub | Pointer to the publication context to be created. |
[out] | p_onoff_cli | Pointer to the OnOff client instance to be allocated. |
Definition at line 160 of file esp_gen_cli_model.c.