-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/coap: Expose configurations to Kconfig
- Loading branch information
1 parent
76983f6
commit 02ac496
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2020 HAW Hamburg | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
# | ||
rsource "gcoap/Kconfig" | ||
rsource "Kconfig.coap" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright (c) 2020 HAW Hamburg | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
# | ||
|
||
config HAS_PROTOCOL_COAP | ||
bool | ||
#TODO: This should be selected the Kconfig of the modules that provide it, but | ||
# nanocoap does not have Kconfig file yet. | ||
default y if MODULE_NANOCOAP | ||
help | ||
Specifies that CoAP support is present. | ||
|
||
menuconfig KCONFIG_COAP | ||
bool "Configure CoAP generic options" | ||
depends on HAS_PROTOCOL_COAP | ||
help | ||
Configure CoAP generic options via Kconfig. | ||
|
||
if KCONFIG_COAP | ||
|
||
config COAP_ACK_TIMEOUT | ||
int "Timeout in seconds for a response to a confirmable request" | ||
default 2 | ||
help | ||
This value is for the response to the initial confirmable message. The | ||
timeout doubles for subsequent retries. To avoid synchronization of | ||
resends across hosts, the actual timeout is chosen randomly between | ||
@ref CONFIG_COAP_ACK_TIMEOUT and | ||
(@ref CONFIG_COAP_ACK_TIMEOUT * @ref CONFIG_COAP_RANDOM_FACTOR_1000 / 1000). | ||
|
||
config COAP_RANDOM_FACTOR_1000 | ||
int "Timeout random factor (multiplied by 1000)" | ||
default 1500 | ||
help | ||
This value is used to calculate the upper bound for the timeout. It | ||
represents the `ACK_RANDOM_FACTOR` | ||
([RFC 7252, section 4.2](https://tools.ietf.org/html/rfc7252#section-4.2)) | ||
multiplied by 1000, to avoid floating point arithmetic. | ||
|
||
config COAP_MAX_RETRANSMIT | ||
int "Maximum number of retransmissions" | ||
default 4 | ||
help | ||
Maximum number of retransmissions for a confirmable request. | ||
|
||
endif # KCONFIG_COAP |