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 Configuration Server for ESP BLE Mesh. More...
#include "meshx_config_server.h"
Go to the source code of this file.
Data Structures | |
struct | config_server_model_evt_map |
Macros | |
#define | CONFIG_SRV_INIT_MAGIC 0x2307 |
Typedefs | |
typedef struct config_server_model_evt_map | config_server_model_evt_map_t |
Functions | |
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. | |
meshx_err_t | meshx_init_config_server () |
Initializes the 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. | |
meshx_err_t | meshx_get_config_srv_model (meshx_ptr_t p_model) |
Retrieves the configuration server model for the MeshX framework. | |
Variables | |
static uint16_t | config_srv_init_flag = 0 |
static const config_server_model_evt_map_t | config_server_model_evt_map_table [] |
uint16_t | config_srv_evt_map_count = sizeof(config_server_model_evt_map_table) / sizeof(config_server_model_evt_map_t) |
Implementation of the Configuration Server for ESP BLE Mesh.
Copyright © 2024 - 2025 MeshX
This file contains the initialization and event handling logic for the BLE Mesh Configuration Server, including the management of callback registrations and event dispatching.
Definition in file meshx_config_server.c.
#define CONFIG_SRV_INIT_MAGIC 0x2307 |
Definition at line 15 of file meshx_config_server.c.
typedef struct config_server_model_evt_map config_server_model_evt_map_t |
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.
[in] | cb | Callback function to register. |
[in] | config_evt_bmap | Bitmap of events the callback is interested in. |
Definition at line 122 of file meshx_config_server.c.
|
static |
Handles the configuration server events from the control task.
This function processes the events received from the control task and publishes them to the registered callbacks for the configuration server.
[in] | pdev | Pointer to the device structure. |
[in] | evt | Event type from the control task. |
[in] | params | Pointer to the parameters associated with the event. |
Definition at line 52 of file meshx_config_server.c.
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.
[out] | p_conf_srv | Pointer to a variable where the configuration server instance will be stored. The pointer must be of type void** . |
MESHX_SUCCESS
on successful retrieval of the configuration server instance.meshx_err_t
on failure. Definition at line 151 of file meshx_config_server.c.
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.
[out] | p_model | Pointer to a variable where the address of the configuration server model will be stored. The caller must ensure that the pointer is valid. |
MESHX_SUCCESS
on success.meshx_err_t
on failure. Definition at line 171 of file meshx_config_server.c.
meshx_err_t meshx_init_config_server | ( | void | ) |
Initializes the Configuration Server.
Initialize the meshxuction configuration server.
Registers the BLE Mesh Configuration Server callback function and prepares the server for use.
Definition at line 97 of file meshx_config_server.c.
|
static |
Definition at line 27 of file meshx_config_server.c.
uint16_t config_srv_evt_map_count = sizeof(config_server_model_evt_map_table) / sizeof(config_server_model_evt_map_t) |
Definition at line 38 of file meshx_config_server.c.
|
static |
Definition at line 18 of file meshx_config_server.c.