Loading...
Searching...
No Matches
CoAP compile configurations

Detailed Description

Timing parameters

These parameters are defined as configurable in [RFC 7252, section 4.8.1] (https://tools.ietf.org/html/rfc7252#section-4.8.1).

#define CONFIG_COAP_ACK_TIMEOUT_MS   (2000)
 Timeout in milliseconds for a response to a confirmable request.
 
#define CONFIG_COAP_RANDOM_FACTOR_1000   (1500)
 Used to calculate upper bound for timeout.
 
#define CONFIG_COAP_SEPARATE_RESPONSE_TIMEOUT_MS   (10 * MS_PER_SEC)
 Timeout in milliseconds for a separate (deferred) response sent after an empty ACK.
 
#define CONFIG_COAP_MAX_RETRANSMIT   (4)
 Maximum number of retransmissions for a confirmable request.
 

Macro Definition Documentation

◆ CONFIG_COAP_ACK_TIMEOUT_MS

#define CONFIG_COAP_ACK_TIMEOUT_MS   (2000)

Timeout in milliseconds 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_MS and (CONFIG_COAP_ACK_TIMEOUT_MS * CONFIG_COAP_RANDOM_FACTOR_1000 / 1000).

Definition at line 566 of file coap.h.

◆ CONFIG_COAP_MAX_RETRANSMIT

#define CONFIG_COAP_MAX_RETRANSMIT   (4)

Maximum number of retransmissions for a confirmable request.

Definition at line 592 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_MS

Definition at line 579 of file coap.h.

◆ CONFIG_COAP_SEPARATE_RESPONSE_TIMEOUT_MS

#define CONFIG_COAP_SEPARATE_RESPONSE_TIMEOUT_MS   (10 * MS_PER_SEC)

Timeout in milliseconds for a separate (deferred) response sent after an empty ACK.

Definition at line 587 of file coap.h.