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

Header file for the meshxuction configuration server model. More...

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

Go to the source code of this file.

Functions

meshx_err_t meshx_get_config_srv_model (void *p_model)
 Retrieves the configuration server model for the MeshX framework.
 
meshx_err_t meshx_init_config_server (void)
 Initialize the meshxuction configuration server.
 
meshx_err_t meshx_config_server_cb_reg (config_srv_cb_t cb, uint32_t config_evt_bmap)
 Registers a configuration server callback for specific events.
 
meshx_err_t meshx_get_config_srv_instance (void **p_conf_srv)
 Retrieves the instance of the MeshX configuration server.
 

Detailed Description

Header file for the meshxuction configuration server model.

Copyright © 2024 - 2025 MeshX

This file contains the definitions and function declarations for the meshxuction configuration server model used in the ESP32 BLE Mesh Node.

Author
Pranjal Chanda

Definition in file meshx_config_server.h.

Function Documentation

◆ meshx_config_server_cb_reg()

meshx_err_t meshx_config_server_cb_reg ( config_srv_cb_t cb,
uint32_t config_evt_bmap )

Registers a configuration server callback for specific events.

Adds a new callback registration to the linked list for dispatching events.

Parameters
[in]cbCallback function to register.
[in]config_evt_bmapBitmap of events the callback is interested in.
Returns
MESHX_SUCCESS on success, an error code otherwise.

Definition at line 122 of file meshx_config_server.c.

123{
124 if (cb == NULL || config_evt_bmap == 0)
125 {
126 return MESHX_INVALID_ARG; // Invalid arguments
127 }
128
131 config_evt_bmap,
133
134}
meshx_err_t(* control_task_msg_handle_t)(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Function pointer type for control task message handler.
@ CONTROL_TASK_MSG_CODE_CONFIG
meshx_err_t control_task_msg_subscribe(control_task_msg_code_t msg_code, control_task_msg_evt_t evt_bmap, control_task_msg_handle_t callback)
Subscribe to a control task message.
@ MESHX_INVALID_ARG
Definition meshx_err.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshx_get_config_srv_instance()

meshx_err_t meshx_get_config_srv_instance ( void ** p_conf_srv)

Retrieves the instance of the MeshX configuration server.

This function provides access to the configuration server instance used in the MeshX framework. The configuration server is responsible for managing and storing configuration settings for the mesh network.

Parameters
[out]p_conf_srvPointer to a variable where the configuration server instance will be stored. The pointer must be of type void**.
Returns
  • MESHX_SUCCESS on successful retrieval of the configuration server instance.
  • An appropriate error code of type meshx_err_t on failure.

Definition at line 151 of file meshx_config_server.c.

152{
153 return meshx_plat_get_config_srv_instance(p_conf_srv);
154}
meshx_err_t meshx_plat_get_config_srv_instance(meshx_ptr_t *p_conf_srv)
Retrieve the instance of the BLE Mesh configuration server.
Here is the call graph for this function:

◆ meshx_get_config_srv_model()

meshx_err_t meshx_get_config_srv_model ( meshx_ptr_t p_model)

Retrieves the configuration server model for the MeshX framework.

This function provides access to the configuration server model used in the MeshX 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.
  • An appropriate error code of type meshx_err_t on failure.

Definition at line 171 of file meshx_config_server.c.

172{
173 return meshx_plat_get_config_srv_model(p_model);
174}
meshx_err_t meshx_plat_get_config_srv_model(meshx_ptr_t p_model)
Retrieves the configuration server model for the BLE Mesh.
Here is the call graph for this function:

◆ meshx_init_config_server()

meshx_err_t meshx_init_config_server ( void )

Initialize the meshxuction configuration server.

Returns
MESHX_SUCCESS on success, or an error code on failure.

Initialize the meshxuction configuration server.

Registers the BLE Mesh Configuration Server callback function and prepares the server for use.

Returns
MESHX_SUCCESS on success, an error code otherwise.

Definition at line 97 of file meshx_config_server.c.

98{
100 return MESHX_INVALID_ARG;
101
103
108
110}
#define MESHX_MODEL_ID_CONFIG_SRV
BLE Mesh models related Model ID and Opcode definitions.
meshx_err_t meshx_plat_config_srv_init(void)
Initializes the MeshX platform configuration server.
static meshx_err_t meshx_config_server_control_task_handler(const dev_struct_t *pdev, control_task_msg_evt_t evt, const void *params)
Handles the configuration server events from the control task.
static uint16_t config_srv_init_flag
#define CONFIG_SRV_INIT_MAGIC
@ CONTROL_TASK_MSG_CODE_FRM_BLE
Here is the call graph for this function:
Here is the caller graph for this function: