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
Go to the documentation of this file.
1
13
14#pragma once
15
16#include <stdio.h>
17#include <string.h>
18#include <inttypes.h>
19#include <meshx_err.h>
23#include "unit_test.h"
24
25/*********************************************************************
26 * FEATURE CONFIGURATION
27 * *******************************************************************/
28
33#ifndef CONFIG_SECTION_ENABLE_ELEMENT_TABLE
34#define CONFIG_SECTION_ENABLE_ELEMENT_TABLE 0
35#endif /* CONFIG_SECTION_ENABLE_ELEMENT_TABLE */
36
37#define MAX_ELE_CNT CONFIG_MAX_ELEMENT_COUNT
38#define MESHX_NVS_STORE "meshx_store"
39
43typedef struct meshx_app_store
44{
45 uint16_t net_key_id;
46 uint16_t node_addr;
48
60
71
81typedef meshx_err_t (*element_comp_fn_t)(dev_struct_t *pdev, uint16_t element_cnt);
82
92
93#if CONFIG_SECTION_ENABLE_ELEMENT_TABLE
94
104#define REG_MESHX_ELEMENT_FN(_name, _type, _fn) \
105 __section(".element_table") const element_comp_table_t _name = { \
106 .idx = _type, \
107 .element_comp_fn = &_fn, \
108 }
109
110#else
111
122#define REG_MESHX_ELEMENT_FN(_name, _type, _fn)
123
124#endif /* CONFIG_SECTION_ENABLE_ELEMENT_TABLE */
void * meshx_ptr_t
struct element_comp_table element_comp_table_t
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
meshx_err_t(* element_comp_fn_t)(dev_struct_t *pdev, uint16_t element_cnt)
MeshX Compostion init Function Pointer.
#define MAX_ELE_CNT
struct meshx_app_store meshx_app_store_t
Structure to store mesh application data.
struct meshx_model_interface meshx_model_interface_t
Internal configuration settings for MeshX.
MeshX Error Codes.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Logging interface for MeshX with color-coded output.
Platform abstraction layer for MeshX.
#define MESHX_ELEMENT
Structure representing the device composition and elements.
void * composition
meshx_app_store_t meshx_store
size_t element_idx
MESHX_ELEMENT elements[MAX_ELE_CNT]
uint8_t uuid[16]
Structure to store element composition functions.
element_comp_fn_t element_comp_fn
Structure to store mesh application data.
uint16_t net_key_id
uint16_t node_addr
Header file for the production console unit test functionality.