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 the generic server model in the BLE mesh node application. More...
Go to the source code of this file.
Functions | |
meshx_err_t | meshx_gen_srv_send_msg_to_ble (control_task_msg_evt_to_ble_t evt, const meshx_gen_srv_cb_param_t *params) |
Sends a message to the BLE subsystem via the control task. | |
meshx_err_t | meshx_gen_srv_reg_cb (uint32_t model_id, meshx_server_cb cb) |
Registers a callback function for a specific generic server model. | |
meshx_err_t | meshx_gen_srv_dereg_cb (uint32_t model_id, meshx_server_cb cb) |
Callback function to deregister a generic server model. | |
meshx_err_t | meshx_gen_srv_init (void) |
Initialize the meshxuction generic server. | |
meshx_err_t | meshx_gen_srv_status_send (meshx_model_t *p_model, meshx_ctx_t *p_ctx, meshx_gen_srv_state_change_t state_change, size_t data_len) |
Sends a status message for the Generic Server model. | |
Header file for the generic server model in the BLE mesh node application.
Copyright © 2024 - 2025 MeshX
This file contains the function declarations and data structures for registering, deregistering, and initializing the generic server model callbacks in the BLE mesh node application.
Definition in file meshx_gen_server.h.
meshx_err_t meshx_gen_srv_dereg_cb | ( | uint32_t | model_id, |
meshx_server_cb | cb ) |
Callback function to deregister a generic server model.
This function is called to deregister a generic server model identified by the given model ID.
[in] | model_id | The ID of the model to be deregistered. |
[in] | cb | The callback function to be deregistered. |
Definition at line 148 of file meshx_gen_server.c.
meshx_err_t meshx_gen_srv_init | ( | void | ) |
Initialize the meshxuction generic server.
This function sets up the necessary configurations and initializes the meshxuction generic server for the BLE mesh node.
Definition at line 166 of file meshx_gen_server.c.
meshx_err_t meshx_gen_srv_reg_cb | ( | uint32_t | model_id, |
meshx_server_cb | cb ) |
Registers a callback function for a specific generic server model.
This function associates a callback with the given model ID, allowing the server to handle events or messages related to that model.
[in] | model_id | The unique identifier of the generic server model. |
[in] | cb | The callback function to be registered for the model. |
Definition at line 127 of file meshx_gen_server.c.
meshx_err_t meshx_gen_srv_send_msg_to_ble | ( | control_task_msg_evt_to_ble_t | evt, |
const meshx_gen_srv_cb_param_t * | params ) |
Sends a message to the BLE subsystem via the control task.
This function wraps the call to control_task_msg_publish
with the appropriate message code for BLE communication. It allows sending an event and associated parameters to the BLE handler.
evt | The event type to send to BLE, of type control_task_msg_evt_to_ble_t. |
params | Pointer to the parameters associated with the event. |
Definition at line 100 of file meshx_gen_server.c.
meshx_err_t meshx_gen_srv_status_send | ( | meshx_model_t * | p_model, |
meshx_ctx_t * | p_ctx, | ||
meshx_gen_srv_state_change_t | state_change, | ||
size_t | data_len ) |
Sends a status message for the Generic Server model.
This function sends a status message for the Generic Server model to the BLE Mesh network. It checks if the provided model and context are valid, and if the opcode is within the range of supported Generic Server opcodes.
[in] | p_model | Pointer to the Generic Server model structure. |
[in] | p_ctx | Pointer to the context containing message information. |
[in] | state_change | The state change data to be sent in the status message. |
[in] | data_len | The length of the data to be sent in the status message. |
Definition at line 71 of file meshx_gen_server.c.