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

Common application definitions and includes for BLE Mesh Node. More...

#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <meshx_err.h>
#include <meshx_config_internal.h>
#include <interface/logging/meshx_log.h>
#include "interface/meshx_platform.h"
#include "unit_test.h"
Include dependency graph for meshx_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  meshx_app_store
 Structure to store mesh application data. More...
 
struct  dev_struct
 Structure representing the device composition and elements. More...
 
struct  meshx_model_interface
 
struct  element_comp_table
 Structure to store element composition functions. More...
 

Macros

#define CONFIG_SECTION_ENABLE_ELEMENT_TABLE   0
 Enable Element Table registration using Linker script.
 
#define MAX_ELE_CNT   CONFIG_MAX_ELEMENT_COUNT
 
#define MESHX_NVS_STORE   "meshx_store"
 
#define REG_MESHX_ELEMENT_FN(_name, _type, _fn)
 Register an element composition function.
 

Typedefs

typedef struct meshx_app_store meshx_app_store_t
 Structure to store mesh application data.
 
typedef struct dev_struct dev_struct_t
 Structure representing the device composition and elements.
 
typedef struct meshx_model_interface meshx_model_interface_t
 
typedef meshx_err_t(* element_comp_fn_t) (dev_struct_t *pdev, uint16_t element_cnt)
 MeshX Compostion init Function Pointer.
 
typedef struct element_comp_table element_comp_table_t
 

Detailed Description

Common application definitions and includes for BLE Mesh Node.

Copyright © 2024 - 2025 MeshX

This header file contains common definitions, includes, and data structures used across the BLE Mesh Node application.

Author
Pranjal Chanda

Definition in file meshx_common.h.

Macro Definition Documentation

◆ CONFIG_SECTION_ENABLE_ELEMENT_TABLE

#define CONFIG_SECTION_ENABLE_ELEMENT_TABLE   0

Enable Element Table registration using Linker script.

Note
This feature is disabled by default.

Definition at line 34 of file meshx_common.h.

◆ MAX_ELE_CNT

#define MAX_ELE_CNT   CONFIG_MAX_ELEMENT_COUNT

Definition at line 37 of file meshx_common.h.

◆ MESHX_NVS_STORE

#define MESHX_NVS_STORE   "meshx_store"

Definition at line 38 of file meshx_common.h.

◆ REG_MESHX_ELEMENT_FN

#define REG_MESHX_ELEMENT_FN ( _name,
_type,
_fn )

Register an element composition function.

Note
Currently feature is disabled using CONFIG_SECTION_ENABLE_ELEMENT_TABLE

This macro registers an element composition function to the element table.

Parameters
_nameName of the element composition function.
_typeType of the element.
_fnElement composition function.

Definition at line 122 of file meshx_common.h.

Typedef Documentation

◆ dev_struct_t

typedef struct dev_struct dev_struct_t

Structure representing the device composition and elements.

◆ element_comp_fn_t

typedef meshx_err_t(* element_comp_fn_t) (dev_struct_t *pdev, uint16_t element_cnt)

MeshX Compostion init Function Pointer.

Parameters
[in]pdevPointer to the device structure.
[in]element_cntNumber of elements.
Returns
meshx_err_t

Definition at line 81 of file meshx_common.h.

◆ element_comp_table_t

◆ meshx_app_store_t

Structure to store mesh application data.

◆ meshx_model_interface_t