File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 48
48
49
49
#define COAP_DEFAULT_MAX_AGE 60
50
50
#define COAP_RESPONSE_TIMEOUT 2
51
- #define COAP_MAX_RETRANSMIT 4
51
+ #define COAP_MAX_RETRANSMIT LWM2M_COAP_DEFAULT_MAX_RETRANSMIT
52
52
#define COAP_ACK_RANDOM_FACTOR 1.5
53
53
#define COAP_MAX_LATENCY 100
54
54
#define COAP_PROCESSING_DELAY COAP_RESPONSE_TIMEOUT
Original file line number Diff line number Diff line change @@ -239,6 +239,17 @@ function(target_sources_wakaama target)
239
239
message (STATUS "${target} : Default CoAP block size not set, using ${LWM2M_COAP_DEFAULT_BLOCK_SIZE} " )
240
240
endif ()
241
241
242
+ # LWM2M_COAP_DEFAULT_MAX_RETRANSMIT is needed by source files -> always set it
243
+ if (NOT CURRENT_TARGET_COMPILE_DEFINITIONS MATCHES "LWM2M_COAP_DEFAULT_MAX_RETRANSMIT=" )
244
+ target_compile_definitions (
245
+ ${target} PRIVATE "LWM2M_COAP_DEFAULT_MAX_RETRANSMIT=${LWM2M_COAP_DEFAULT_MAX_RETRANSMIT} "
246
+ )
247
+ message (
248
+ STATUS
249
+ "${target} : Default CoAP max retransmission count not set, using ${LWM2M_COAP_DEFAULT_MAX_RETRANSMIT} "
250
+ )
251
+ endif ()
252
+
242
253
# Detect invalid configuration already during CMake run
243
254
if (NOT CURRENT_TARGET_COMPILE_DEFINITIONS MATCHES "LWM2M_SERVER_MODE|LWM2M_BOOTSTRAP_SERVER_MODE|LWM2M_CLIENT_MODE" )
244
255
message (FATAL_ERROR "${target} : At least one mode (client, server, bootstrap server) must be enabled!" )
@@ -339,3 +350,9 @@ set(LWM2M_COAP_DEFAULT_BLOCK_SIZE
339
350
1024
340
351
CACHE STRING "Default CoAP block size; Used if not set on a per-target basis"
341
352
)
353
+
354
+ # The maximum number of retransmissions used for confirmable messages.
355
+ set (LWM2M_COAP_DEFAULT_MAX_RETRANSMIT
356
+ 4
357
+ CACHE STRING "Default CoAP max retransmissions; Used if not set on a per-target basis"
358
+ )
You can’t perform that action at this time.
0 commit comments