CoAP compile configurations

Detailed Description

Timing parameters

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

#define COAP_ACK_TIMEOUT   (2U)
 Timeout in seconds for a response to a confirmable request. More...
 
#define COAP_RANDOM_FACTOR   (1.5)
 Used to calculate upper bound for timeout; see COAP_ACK_TIMEOUT.
 
#define COAP_ACK_VARIANCE   (1U)
 Approximation for maximum variation for confirmable timeout. More...
 
#define COAP_MAX_RETRANSMIT   (4)
 Maximum number of retransmissions for a confirmable request.
 

Macro Definition Documentation

◆ COAP_ACK_TIMEOUT

#define 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 COAP_ACK_TIMEOUT and (COAP_ACK_TIMEOUT * COAP_RANDOM_FACTOR).

Definition at line 197 of file coap.h.

◆ COAP_ACK_VARIANCE

#define COAP_ACK_VARIANCE   (1U)

Approximation for maximum variation for confirmable timeout.

Must be an integer, defined as:

(COAP_ACK_TIMEOUT * COAP_RANDOM_FACTOR) - COAP_ACK_TIMEOUT

Like COAP_ACK_TIMEOUT, this value is valid for the initial confirmable message, and doubles for subsequent retries.

This parameter is nanocoap-specific, and is not defined in RFC 7252.

Definition at line 218 of file coap.h.