Pico-Framework
A web-first embedded framework for C++
Loading...
Searching...
No Matches
framework_config_system.h
Go to the documentation of this file.
1
12
#ifndef FRAMEWORK_CONFIG_H
13
#define FRAMEWORK_CONFIG_H
14
15
#pragma once
16
25
#ifndef NTP_TIMEOUT_SECONDS
26
#define NTP_TIMEOUT_SECONDS 15
27
#endif
28
29
#ifndef DETECT_LOCAL_TIMEZONE
30
#define DETECT_LOCAL_TIMEZONE 0
31
#endif
32
33
#ifndef EVENT_QUEUE_LENGTH
34
#define EVENT_QUEUE_LENGTH 8
// Default max bufferred events in the queues
35
#endif
36
41
#ifndef WIFI_RETRY_TIMEOUT_MS
42
#define WIFI_RETRY_TIMEOUT_MS 15000
43
#endif
44
48
#ifndef WIFI_MAX_RETRIES
49
#define WIFI_MAX_RETRIES 5
50
#endif
51
58
#ifndef WIFI_REBOOT_ON_FAILURE
59
#define WIFI_REBOOT_ON_FAILURE false
60
#endif
66
#ifndef WIFI_MONITOR_INTERVAL_MS
67
#define WIFI_MONITOR_INTERVAL_MS 30000
// Default: check every 30s
68
#endif
69
70
71
77
#ifndef MULTIPART_UPLOAD_PATH
78
#define MULTIPART_UPLOAD_PATH "/uploads"
79
#endif
80
81
// Note that files of any length can be streamed from the server or uploaded multipart.
82
// This is just the maximum size of the HTTP body that can be processed in one go.
83
// However if a regular request is made with a body larger than this, it will be truncated.
84
85
#if defined(PICO_RP2350)
86
#ifndef MAX_HTTP_BODY_LENGTH
87
#define MAX_HTTP_BODY_LENGTH 4 * 1024
88
#endif
89
#else
90
#ifndef MAX_HTTP_BODY_LENGTH
91
#define MAX_HTTP_BODY_LENGTH 16 * 1024
92
#endif
93
#endif
94
95
#ifndef HTTP_IDLE_TIMEOUT
96
#define HTTP_IDLE_TIMEOUT 500
97
#endif
98
#ifndef HTTP_RECEIVE_TIMEOUT
99
#define HTTP_RECEIVE_TIMEOUT 2000
100
#endif
101
102
#ifndef HTTP_BUFFER_SIZE
103
#define HTTP_BUFFER_SIZE 1460
104
#endif
105
106
// === Framework configuration file ===
107
// This file contains various configuration settings for the framework.
108
#ifndef STREAM_SEND_DELAY_MS
109
#define STREAM_SEND_DELAY_MS 20
110
#endif
111
112
#ifndef ENABLE_GPIO_EVENTS
113
#define ENABLE_GPIO_EVENTS
114
#endif
115
116
// GPIO events can be configured to use either FreeRTOS notifications or event queues
117
// Notifications are faster and more efficient, but events allow for data passing and broadcasting).
118
// They can also be configured to do both
119
#ifndef GPIO_NOTIFICATIONS
120
#define GPIO_NOTIFICATIONS 1
121
#endif
122
#ifndef GPIO_EVENTS
123
#define GPIO_EVENTS 2
124
#endif
125
#ifndef GPIO_EVENTS_AND_NOTIFICATIONS
126
#define GPIO_EVENTS_AND_NOTIFICATIONS (GPIO_NOTIFICATIONS | GPIO_EVENTS)
127
#endif
128
129
#ifndef GPIO_EVENT_HANDLING
130
#define GPIO_EVENT_HANDLING GPIO_EVENTS_AND_NOTIFICATIONS
131
#endif
132
133
// === Debug Trace Configuration ===
134
135
//#define QUIET_MODE ///< Set to disable all normal behavior print output, don't define to print
136
137
#ifdef QUIET_MODE
138
#ifndef QUIET_PRINTF
139
#define QUIET_PRINTF(...) do {} while (0)
140
#endif
141
#else
142
#ifndef QUIET_PRINTF
143
#define QUIET_PRINTF(...) printf(__VA_ARGS__)
144
#endif
145
#endif
146
147
// === Debug Trace Configuration ===
148
149
#ifndef TRACE_USE_TIMESTAMP
150
#define TRACE_USE_TIMESTAMP 1
151
#endif
152
#ifndef TRACE_USE_SD
153
#define TRACE_USE_SD 0
154
#endif
155
156
//#define LFS_TRACE_YES // set to enable LittleFS trace output, comment out to disable
157
158
// === Module-specific trace enables ===
159
#ifndef TRACE_AppContext
160
#define TRACE_AppContext 0
161
#endif
162
#ifndef TRACE_ChunkedDecoder
163
#define TRACE_ChunkedDecoder 0
164
#endif
165
#ifndef TRACE_FatFsStorageManager
166
#define TRACE_FatFsStorageManager 0
167
#endif
168
#ifndef TRACE_FrameworkApp
169
#define TRACE_FrameworkApp 0
170
#endif
171
#ifndef TRACE_FrameworkController
172
#define TRACE_FrameworkController 0
173
#endif
174
#ifndef TRACE_FrameworkModel
175
#define TRACE_FrameworkModel 0
176
#endif
177
#ifndef TRACE_FrameworkTask
178
#define TRACE_FrameworkTask 0
179
#endif
180
#ifndef TRACE_FrameworkManager
181
#define TRACE_FrameworkManager 0
182
#endif
183
#ifndef TRACE_HttpClient
184
#define TRACE_HttpClient 0
185
#endif
186
#ifndef TRACE_HttpFileserver
187
#define TRACE_HttpFileserver 0
188
#endif
189
#ifndef TRACE_HttpParser
190
#define TRACE_HttpParser 0
191
#endif
192
#ifndef TRACE_HttpRequest
193
#define TRACE_HttpRequest 0
194
#endif
195
#ifndef TRACE_HttpResponse
196
#define TRACE_HttpResponse 0
197
#endif
198
#ifndef TRACE_HttpServer
199
#define TRACE_HttpServer 0
200
#endif
201
#ifndef TRACE_Middleware
202
#define TRACE_Middleware 0
203
#endif
204
#ifndef TRACE_JsonParser
205
#define TRACE_JsonParser 0
206
#endif
207
#ifndef TRACE_JsonRequestHelper
208
#define TRACE_JsonRequestHelper 0
209
#endif
210
#ifndef TRACE_JsonService
211
#define TRACE_JsonService 0
212
#endif
213
#ifndef TRACE_JwtAuthenticator
214
#define TRACE_JwtAuthenticator 0
215
#endif
216
#ifndef TRACE_LittleFsStorageManager
217
#define TRACE_LittleFsStorageManager 0
218
#endif
219
#ifndef TRACE_LwipDnsResolver
220
#define TRACE_LwipDnsResolver 0
221
#endif
222
#ifndef TRACE_MultipartParser
223
#define TRACE_MultipartParser 0
224
#endif
225
#ifndef TRACE_Network
226
#define TRACE_Network 0
227
#endif
228
#ifndef TRACE_Router
229
#define TRACE_Router 0
230
#endif
231
#ifndef TRACE_Tcp
232
#define TRACE_Tcp 0
233
#endif
234
#ifndef TRACE_utility
235
#define TRACE_utility 0
236
#endif
237
#ifndef TRACE_TimeManager
238
#define TRACE_TimeManager 0
239
#endif
240
// etc.
241
242
// === Global minimum log level (for all modules) ===
243
// Options: 0 = INFO, 1 = WARN, 2 = ERROR
244
#ifndef TRACE_LEVEL_MIN
245
#define TRACE_LEVEL_MIN TRACE_LVL_INFO
246
#endif
247
#ifndef TRACE_LOG_PATH
248
#define TRACE_LOG_PATH "/framework_trace.log"
249
#endif
250
251
#endif
// FRAMEWORK_CONFIG_H
framework
framework_config_system.h
Generated by
1.9.8