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_config_srv.h File Reference

Header file for MeshX BLE Mesh Configuration Server. More...

Include dependency graph for meshx_ble_mesh_config_srv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  meshx_state_change_cfg_mod_pub_set_t
 Configuration Server model related context. More...
 
struct  meshx_state_change_cfg_mod_pub_va_set_t
 
struct  meshx_state_change_cfg_model_sub_add_t
 
struct  meshx_state_change_cfg_model_sub_delete_t
 
struct  meshx_state_change_cfg_netkey_add_t
 
struct  meshx_state_change_cfg_netkey_update_t
 
struct  meshx_state_change_cfg_netkey_delete_t
 
struct  meshx_state_change_cfg_appkey_add_t
 
struct  meshx_state_change_cfg_appkey_update_t
 
struct  meshx_state_change_cfg_appkey_delete_t
 
struct  meshx_state_change_cfg_model_app_bind_t
 
struct  meshx_state_change_cfg_model_app_unbind_t
 
struct  meshx_state_change_cfg_kr_phase_set_t
 
union  meshx_cfg_srv_state_change_t
 Configuration Server model state change value union. More...
 
struct  meshx_config_srv_cb_param
 

Typedefs

typedef control_task_msg_handle_t config_srv_cb_t
 
typedef control_task_msg_evt_config_t config_evt_t
 
typedef struct meshx_config_srv_cb_param meshx_config_srv_cb_param_t
 

Functions

meshx_err_t meshx_plat_config_srv_init (void)
 Initializes the MeshX platform configuration server.
 
meshx_err_t meshx_plat_get_config_srv_instance (meshx_ptr_t *p_conf_srv)
 Retrieve the instance of the BLE Mesh configuration server.
 
meshx_err_t meshx_plat_get_config_srv_model (meshx_ptr_t p_model)
 Retrieves the configuration server model for the BLE Mesh.
 

Detailed Description

Header file for MeshX BLE Mesh Configuration Server.

Copyright (c) 2024 - 2025 MeshX

This file contains the definitions, data structures, and function declarations for the MeshX BLE Mesh Configuration Server. It provides the necessary APIs and context for managing the configuration server model in a BLE Mesh network.

Author
Pranjal Chanda

Definition in file meshx_ble_mesh_config_srv.h.

Typedef Documentation

◆ config_evt_t

◆ config_srv_cb_t

◆ meshx_config_srv_cb_param_t

Function Documentation

◆ meshx_plat_config_srv_init()

meshx_err_t meshx_plat_config_srv_init ( void )

Initializes the MeshX platform configuration server.

This function sets up the necessary resources and configurations for the MeshX BLE Mesh configuration server. It should be called during the initialization phase of the application to ensure proper operation of the MeshX BLE Mesh stack.

Returns
  • MESHX_SUCCESS on successful initialization.
  • Appropriate error code from meshx_err_t on failure.

Definition at line 95 of file esp_cfg_srv_model.c.

96{
97 esp_err_t err = esp_ble_mesh_register_config_server_callback(
98 (esp_ble_mesh_cfg_server_cb_t)&meshx_ble_mesh_config_server_cb);
99 if (err)
100 {
101 MESHX_LOGE(MODULE_ID_MODEL_SERVER, "Error plat registering config server (Err: 0x%x)", err);
102 return MESHX_ERR_PLAT;
103 }
104 return MESHX_SUCCESS;
105}
static void meshx_ble_mesh_config_server_cb(esp_ble_mesh_cfg_server_cb_event_t event, const esp_ble_mesh_cfg_server_cb_param_t *param)
BLE Mesh Configuration Server callback function.
@ MESHX_SUCCESS
Definition meshx_err.h:40
@ MESHX_ERR_PLAT
Definition meshx_err.h:43
#define MESHX_LOGE(module_id, format,...)
Definition meshx_log.h:73
@ MODULE_ID_MODEL_SERVER
Definition module_id.h:30
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshx_plat_get_config_srv_instance()

meshx_err_t meshx_plat_get_config_srv_instance ( meshx_ptr_t * p_conf_srv)

Retrieve the instance of the BLE Mesh configuration server.

This function provides access to the BLE Mesh configuration server instance.

Parameters
[out]p_conf_srvPointer to a variable where the configuration server instance will be stored. The caller must ensure that the pointer is valid and non-NULL.
Returns
  • MESHX_SUCCESS on success.
  • Appropriate error code from meshx_err_t on failure.

Definition at line 107 of file esp_cfg_srv_model.c.

108{
109 if (p_conf_srv == NULL)
110 {
111 return MESHX_INVALID_ARG;
112 }
113 /* Return the pointer to the configuration server instance */
114 *p_conf_srv = &meshx_config_server_instance;
115
116 return MESHX_SUCCESS;
117}
static MESHX_CFG_SRV meshx_config_server_instance
@ MESHX_INVALID_ARG
Definition meshx_err.h:42
Here is the caller graph for this function:

◆ meshx_plat_get_config_srv_model()

meshx_err_t meshx_plat_get_config_srv_model ( meshx_ptr_t p_model)

Retrieves the configuration server model for the BLE Mesh.

This function provides access to the configuration server model used in the BLE Mesh implementation. The retrieved model can be used for configuring and managing the mesh network.

Parameters
[out]p_modelPointer to a variable where the address of the configuration server model will be stored. The caller must ensure that the pointer is valid.
Returns
  • MESHX_SUCCESS on success.
  • Appropriate error code from meshx_err_t on failure.

Definition at line 119 of file esp_cfg_srv_model.c.

120{
121 if (p_model == NULL)
122 {
123 return MESHX_INVALID_ARG;
124 }
125 /* Return the pointer to the configuration server model */
126 memcpy(p_model, &meshx_config_server_model, sizeof(meshx_config_server_model));
127 return MESHX_SUCCESS;
128}
static MESHX_MODEL meshx_config_server_model
Here is the caller graph for this function: