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_cmn.h
Go to the documentation of this file.
1
18#ifndef __MESHX_PLAT_SRV_CMN_H__
19#define __MESHX_PLAT_SRV_CMN_H__
20
21#include "stdlib.h"
22#include "string.h"
23#include "meshx_err.h"
26
27/*
28 * @brief Structure to hold UUID and address information.
29 */
30typedef struct meshx_model
31{
32 uint16_t el_id;
33 uint16_t model_id;
34 uint16_t pub_addr;
37
41typedef struct meshx_ctx
42{
43 uint16_t app_idx;
44 uint16_t net_idx;
45 uint16_t src_addr;
46 uint16_t dst_addr;
47 uint32_t opcode;
50
54typedef struct meshx_prov_params
55{
56 uint8_t *uuid;
57 uint8_t *node_name;
60
75
91
104
119
130meshx_err_t meshx_get_model_id(meshx_ptr_t p_model, uint16_t *model_id);
131
146
165 uint16_t index,
166 meshx_ptr_t p_element_list,
167 meshx_ptr_t p_sig_models,
168 meshx_ptr_t p_ven_models,
169 uint8_t sig_cnt,
170 uint8_t ven_cnt);
171
188 meshx_ptr_t p_composition,
189 meshx_ptr_t p_elements,
190 uint16_t cid,
191 uint16_t pid,
192 uint16_t element_idx);
193
205
218
229meshx_err_t meshx_get_base_element_id(uint16_t *base_el_id);
230
231#endif /* __MESHX_PLAT_SRV_CMN_H__ */
meshx_err_t meshx_plat_del_model_pub(meshx_ptr_t *p_pub)
Deletes the model and publication objects.
meshx_err_t meshx_plat_create_model_pub(meshx_ptr_t *p_pub, uint16_t nmax)
Creates and initializes model and publication structures.
meshx_err_t meshx_plat_add_element_to_composition(uint16_t index, meshx_ptr_t p_element_list, meshx_ptr_t p_sig_models, meshx_ptr_t p_ven_models, uint8_t sig_cnt, uint8_t ven_cnt)
Adds an element to the BLE Mesh composition.
meshx_err_t meshx_create_plat_composition(meshx_ptr_t *p_comp)
Creates a platform-specific BLE Mesh composition object.
meshx_err_t meshx_platform_bt_init(meshx_uuid_addr_t uuid)
Initializes the Bluetooth subsystem of the MeshX platform.
meshx_err_t meshx_plat_composition_init(meshx_ptr_t p_composition, meshx_ptr_t p_elements, uint16_t cid, uint16_t pid, uint16_t element_idx)
Initializes a platform-specific BLE Mesh composition.
meshx_err_t meshx_get_model_id(meshx_ptr_t p_model, uint16_t *model_id)
Retrieve the model ID of a generic server model.
meshx_err_t meshx_plat_client_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_cli)
Creates and initializes a generic client model for BLE Mesh.
meshx_err_t meshx_is_group_subscribed(meshx_model_t *p_model, uint16_t addr)
Checks if a model is subscribed to a specific group address.
struct meshx_prov_params meshx_prov_params_t
Structure to hold provisioning parameters.
struct meshx_model meshx_model_t
meshx_err_t meshx_get_base_element_id(uint16_t *base_el_id)
Retrieves the base element ID for the BLE Mesh platform.
struct meshx_ctx meshx_ctx_t
Structure to hold context information for BLE Mesh operations.
meshx_err_t meshx_plat_ble_mesh_init(const meshx_prov_params_t *prov_cfg, meshx_ptr_t comp)
Initializes the BLE Mesh stack with the given provisioning parameters.
Common definitions for BLE Mesh models and opcodes in the MeshX framework.
void * meshx_ptr_t
uint8_t meshx_uuid_addr_t[MESHX_UUID_ADDR_LEN]
MeshX Error Codes.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Platform abstraction layer for MeshX.
Structure to hold context information for BLE Mesh operations.
meshx_ptr_t p_ctx
uint16_t src_addr
uint16_t dst_addr
Structure as Interface for meshx models.
meshx_ptr_t p_model
Structure to hold provisioning parameters.