#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# iperf3 NRF integration

# Enables client to have NRF_IPERF3 in synchronization with client's own flag.
config NRF_IPERF3_PROMPTLESS
	bool

config  NRF_IPERF3
	bool "Iperf3 NRF integration" if !NRF_IPERF3_PROMPTLESS
	depends on POSIX_API && !PTHREAD_IPC && !NET_SOCKETS_POSIX_NAMES && NEWLIB_LIBC && CJSON_LIB
	help
	  Enable Iperf3 NRF integration

if NRF_IPERF3
menu "NRF Iperf3 selections"

config NRF_IPERF3_HOST_NAME
	string "iperf3 host name"
	default "nrf9160"
	help
	  The iperf3 host name.
	  The host name will be sent as part of a cookie.

config NRF_IPERF3_RESULTS_WAIT_TIME
	int "Maximum response wait time (seconds)"
	default 15
	help
	  Maximum time in seconds to be waited to send and recv results.

config NRF_IPERF3_CLIENT_TEST_START_TIME
	int "Test start delay"
	default 15
	help
	  Time in seconds from control socket creation to actual data transfer start.

config NRF_IPERF3_CLIENT_TEST_ENDING_TIMEOUT
	int "Test ending timeout"
	default 480
	help
	  Time in seconds to wait in TEST_END state.

# The name of this option is mandated by zephyr_interface_library_named cmake directive.
config APP_LINK_WITH_IPERF3
	bool "Link 'app' with IPERF3"
	default y
	help
	  Add IPERF3 header files to the 'app' include path. It may be
	  disabled if the include paths for IPERF3 are causing aliasing
	  issues for 'app'.

#invisible configs:
config NRF_IPERF3_INTEGRATION
	bool
	default y

config NRF_IPERF3_NONBLOCKING_CLIENT_CHANGES
	bool
	default y

config NRF_IPERF3_MULTICONTEXT_SUPPORT
	bool
	default y
	depends on NRF_IPERF3_INTEGRATION

endmenu #NRF iperf3
endif #NRF_IPERF3
