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_config_internal.h
Go to the documentation of this file.
1
11#ifndef __MESHX_CONFIG_INTERNAL_H__
12#define __MESHX_CONFIG_INTERNAL_H__
13
14#include "meshx_config.h"
18#define CONFIG_MESHX_DEFAULT 1
19#define CONFIG_ENABLE_SERVER_COMMON 1
20#define CONFIG_ENABLE_PROVISIONING 1
21#define CONFIG_ENABLE_CONFIG_SERVER 1
22
27#ifndef CONFIG_APP_MAIN
28#error "Define CONFIG_APP_MAIN to the application main function"
29// #define CONFIG_APP_MAIN main
30#endif /* CONFIG_APP_MAIN */
31
32#ifndef CONFIG_CID_ID
33#define CONFIG_CID_ID 0x7908
34#endif /* CONFIG_CID_ID */
35
36#ifndef CONFIG_PID_ID
37#define CONFIG_PID_ID 0x4
38#endif /* CONFIG_PID_ID */
39
40#ifndef CONFIG_PRODUCT_NAME
41#define CONFIG_PRODUCT_NAME "all_in_one"
42#endif /* CONFIG_PRODUCT_NAME */
43
48#ifndef CONFIG_MAX_ELEMENT_COUNT
49#define CONFIG_MAX_ELEMENT_COUNT 5
50#endif /* CONFIG_MAX_ELEMENT_COUNT */
51
55#ifndef CONFIG_RELAY_SERVER_COUNT
56#define CONFIG_RELAY_SERVER_COUNT 1
57#endif /* CONFIG_RELAY_SERVER_COUNT */
58
59
63#ifndef CONFIG_RELAY_CLIENT_COUNT
64#define CONFIG_RELAY_CLIENT_COUNT 1
65#endif /* CONFIG_RELAY_CLIENT_COUNT */
66
67
71#ifndef CONFIG_LIGHT_CWWW_SRV_COUNT
72#define CONFIG_LIGHT_CWWW_SRV_COUNT 1
73#endif /* CONFIG_LIGHT_CWWW_SRV_COUNT */
74
75
79#ifndef CONFIG_LIGHT_CWWW_CLIENT_COUNT
80#define CONFIG_LIGHT_CWWW_CLIENT_COUNT 1
81#endif /* CONFIG_LIGHT_CWWW_CLIENT_COUNT */
82
83
87#ifndef CONFIG_ENABLE_GEN_ONOFF_CLIENT
88#define CONFIG_ENABLE_GEN_ONOFF_CLIENT 1
89#endif /* CONFIG_ENABLE_GEN_ONOFF_CLIENT */
90
91
95#ifndef CONFIG_ENABLE_GEN_ONOFF_SERVER
96#define CONFIG_ENABLE_GEN_ONOFF_SERVER 1
97#endif /* CONFIG_ENABLE_GEN_ONOFF_SERVER */
98
99
103#ifndef CONFIG_ENABLE_LIGHT_CTL_SERVER
104#define CONFIG_ENABLE_LIGHT_CTL_SERVER 1
105#endif /* CONFIG_ENABLE_LIGHT_CTL_SERVER */
106
110#ifndef CONFIG_LIGHT_CTL_CLIENT_COUNT
111#define CONFIG_LIGHT_CTL_CLIENT_COUNT 1
112#endif /* CONFIG_LIGHT_CTL_CLIENT_COUNT */
113
117#ifndef CONFIG_ENABLE_GEN_CLIENT
118#define CONFIG_ENABLE_GEN_CLIENT 1
119#endif /* CONFIG_ENABLE_GEN_CLIENT */
120
124#ifndef CONFIG_ENABLE_GEN_SERVER
125#define CONFIG_ENABLE_GEN_SERVER 1
126#endif /* CONFIG_ENABLE_GEN_SERVER */
127
131#ifndef CONFIG_ENABLE_LIGHT_SERVER
132#define CONFIG_ENABLE_LIGHT_SERVER 1
133#endif /* CONFIG_ENABLE_LIGHT_SERVER */
134
138#ifndef CONFIG_ENABLE_LIGHT_CLIENT
139#define CONFIG_ENABLE_LIGHT_CLIENT 1
140#endif /* CONFIG_ENABLE_LIGHT_CLIENT */
141
145#ifndef CONFIG_ENABLE_UNIT_TEST
146#define CONFIG_ENABLE_UNIT_TEST 0
147#endif /* CONFIG_ENABLE_UNIT_TEST */
148
149/**************************************************************************
150 * CONFIG ERROR CHECK
151 *************************************************************************/
152
156
157#if CONFIG_MAX_ELEMENT_COUNT < 1
158 #error "Element Count must be atleast 1"
159#endif
160
161#if CONFIG_RELAY_SERVER_COUNT
162 #if !CONFIG_ENABLE_GEN_ONOFF_SERVER
163 #error "Enable this to use Relay Server Element"
164 #endif
165#endif /* CONFIG_RELAY_SERVER_COUNT */
166
167#if CONFIG_RELAY_CLIENT_COUNT
168 #if !CONFIG_ENABLE_GEN_CLIENT
169 #error "Enable this to use Relay Client Element"
170 #endif
171#endif /* CONFIG_RELAY_SERVER_COUNT */
172
173#if CONFIG_LIGHT_CWWW_SRV_COUNT
174 #if !CONFIG_ENABLE_GEN_SERVER || !CONFIG_ENABLE_LIGHT_CTL_SERVER
175 #error "Enable this to use CWWW Server Element"
176 #endif
177#endif /* CONFIG_LIGHT_CWWW_SRV_COUNT */
178
179#if CONFIG_LIGHT_CWWW_CLIENT_COUNT
180 #if !CONFIG_ENABLE_GEN_CLIENT || !CONFIG_ENABLE_LIGHT_CLIENT
181 #error "Enable this to use CWWW Client Element"
182 #endif
183#endif /* CONFIG_LIGHT_CWWW_CLIENT_COUNT */
184
188
189#if CONFIG_ENABLE_GEN_ONOFF_SERVER
190 #if !CONFIG_ENABLE_GEN_SERVER
191 #error "Enable this to use OnOff Server Element"
192 #endif
193#endif /* CONFIG_ENABLE_GEN_ONOFF_SERVER */
194
195#if CONFIG_ENABLE_LIGHT_CTL_SERVER
196 #if !CONFIG_ENABLE_LIGHT_SERVER
197 #error "Enable this to use Light Server Element"
198 #endif
199#endif /* CONFIG_ENABLE_LIGHT_CTL_SERVER */
200
201#define CONFIG_TXCM_ENABLE \
202 CONFIG_RELAY_CLIENT_COUNT \
203 || CONFIG_LIGHT_CWWW_CLIENT_COUNT
204
205#endif /* __MESHX_CONFIG_INTERNAL_H__ */