Gcoap compile configurations

Detailed Description

Macros

#define CONFIG_GCOAP_PORT   (5683)
 Server port; use RFC 7252 default if not defined.
 
#define CONFIG_GCOAPS_PORT   (5684)
 Secure Server port; use RFC 7252 default if not defined.
 
#define CONFIG_GCOAP_DTLS_HANDSHAKE_TIMEOUT_USEC   (3 * US_PER_SEC)
 Timeout for the DTLS handshake process. More...
 
#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS   (1)
 Number of minimum available sessions. More...
 
#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS_TIMEOUT_USEC   (15 * US_PER_SEC)
 Timeout for freeing up a session when minimum number of available sessions is not given.
 
#define CONFIG_GCOAP_PDU_BUF_SIZE   (128)
 Size of the buffer used to build a CoAP request or response.
 
#define CONFIG_GCOAP_REQ_WAITING_MAX   (2)
 Maximum number of requests awaiting a response.
 
#define CONFIG_GCOAP_TOKENLEN   (2)
 Length in bytes for a token. More...
 
#define CONFIG_GCOAP_NO_AUTO_INIT   0
 Disables gcoap startup during system auto init. More...
 
#define CONFIG_GCOAP_NO_RETRANS_BACKOFF
 Turns off retransmission backoff when defined (undefined per default) More...
 
#define CONFIG_GCOAP_NON_TIMEOUT   (5000000U)
 Default time to wait for a non-confirmable response [in usec]. More...
 
#define CONFIG_GCOAP_OBS_CLIENTS_MAX   (2)
 Maximum number of Observe clients.
 
#define CONFIG_GCOAP_OBS_REGISTRATIONS_MAX   (2)
 Maximum number of registrations for Observable resources.
 
#define CONFIG_GCOAP_OBS_VALUE_WIDTH   (3)
 Width in bytes of the Observe option value for a notification. More...
 
#define CONFIG_GCOAP_RESEND_BUFS_MAX   (1)
 Count of PDU buffers available for resending confirmable messages.
 

Macro Definition Documentation

◆ CONFIG_GCOAP_DTLS_HANDSHAKE_TIMEOUT_USEC

#define CONFIG_GCOAP_DTLS_HANDSHAKE_TIMEOUT_USEC   (3 * US_PER_SEC)

Timeout for the DTLS handshake process.

Set to 0 for infinite time

Definition at line 437 of file gcoap.h.

◆ CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS

#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS   (1)

Number of minimum available sessions.

If the count of available sessions falls below this threshold, the oldest used session will be closed after a timeout time. Set to 0 to deactivate this feature.

Definition at line 446 of file gcoap.h.

◆ CONFIG_GCOAP_NO_AUTO_INIT

#define CONFIG_GCOAP_NO_AUTO_INIT   0

Disables gcoap startup during system auto init.

If disabled, gcoap_init() must be called by some other means.

Definition at line 504 of file gcoap.h.

◆ CONFIG_GCOAP_NO_RETRANS_BACKOFF

#define CONFIG_GCOAP_NO_RETRANS_BACKOFF

Turns off retransmission backoff when defined (undefined per default)

In normal operations the timeout between retransmissions doubles. When CONFIG_GCOAP_NO_RETRANS_BACKOFF is defined this doubling does not happen.

See also
CONFIG_COAP_ACK_TIMEOUT

Definition at line 536 of file gcoap.h.

◆ CONFIG_GCOAP_NON_TIMEOUT

#define CONFIG_GCOAP_NON_TIMEOUT   (5000000U)

Default time to wait for a non-confirmable response [in usec].

Set to 0 to disable timeout.

Definition at line 546 of file gcoap.h.

◆ CONFIG_GCOAP_OBS_VALUE_WIDTH

#define CONFIG_GCOAP_OBS_VALUE_WIDTH   (3)

Width in bytes of the Observe option value for a notification.

This width is used to determine the length of the 'tick' used to measure the time between observable changes to a resource. A tick is expressed internally as GCOAP_OBS_TICK_EXPONENT, which is the base-2 log value of the tick length in microseconds.

The canonical setting for the value width is 3 (exponent 5), which results in a tick length of 32 usec, per sec. 3.4, 4.4 of the RFC. Width 2 (exponent 16) results in a tick length of ~65 msec, and width 1 (exponent 24) results in a tick length of ~17 sec.

The tick length must be short enough so that the Observe value strictly increases for each new notification. The purpose of the value is to allow a client to detect message reordering within the network latency period (128 sec). For resources that change only slowly, the reduced message length is useful when packet size is limited.

Definition at line 595 of file gcoap.h.

◆ CONFIG_GCOAP_TOKENLEN

#define CONFIG_GCOAP_TOKENLEN   (2)

Length in bytes for a token.

Value must be in the range 0 to GCOAP_TOKENLEN_MAX.

Definition at line 489 of file gcoap.h.