CoAP compile configurations

Detailed Description

Timing parameters

These parameters are defined as configurable in RFC 7252, section 4.8.1.

#define CONFIG_COAP_ACK_TIMEOUT   (2U)
 Timeout in seconds for a response to a confirmable request. More...
 
#define CONFIG_COAP_RANDOM_FACTOR_1000   (1500)
 Used to calculate upper bound for timeout. More...
 
#define CONFIG_COAP_MAX_RETRANSMIT   (4)
 Maximum number of retransmissions for a confirmable request.
 

Macro Definition Documentation

◆ CONFIG_COAP_ACK_TIMEOUT

#define CONFIG_COAP_ACK_TIMEOUT   (2U)

Timeout in seconds for a response to a confirmable request.

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 CONFIG_COAP_ACK_TIMEOUT and (CONFIG_COAP_ACK_TIMEOUT * CONFIG_COAP_RANDOM_FACTOR_1000 / 1000).

Definition at line 195 of file coap.h.

◆ CONFIG_COAP_RANDOM_FACTOR_1000

#define CONFIG_COAP_RANDOM_FACTOR_1000   (1500)

Used to calculate upper bound for timeout.

This represents the ACK_RANDOM_FACTOR (RFC 7252, section 4.2) multiplied by 1000, to avoid floating point arithmetic.

See CONFIG_COAP_ACK_TIMEOUT

Definition at line 208 of file coap.h.