Loading...
Searching...
No Matches

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_MSEC   (3 * MS_PER_SEC)
 Timeout for the DTLS handshake process.
 
#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS   (1)
 Number of minimum available sessions.
 
#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS_TIMEOUT_MSEC   (15 * MS_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.
 
#define CONFIG_GCOAP_NO_AUTO_INIT   0
 Disables gcoap startup during system auto init.
 
#define CONFIG_GCOAP_NO_RETRANS_BACKOFF
 Turns off retransmission backoff when defined (undefined per default)
 
#define CONFIG_GCOAP_NON_TIMEOUT_MSEC   (5000U)
 Default time to wait for a non-confirmable response [in msec].
 
#define CONFIG_GCOAP_OBS_CLIENTS_MAX   (2)
 Maximum number of Observe clients.
 
#define CONFIG_GCOAP_OBS_NOTIFIERS_MAX   (2)
 Maximum number of local notifying endpoint addresses.
 
#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.
 
#define CONFIG_GCOAP_RESEND_BUFS_MAX   (1)
 Count of PDU buffers available for resending confirmable messages.
 
#define CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS   ((CONFIG_COAP_ACK_TIMEOUT_MS / 4) * 3)
 Timeout in milliseconds for the forward proxy to send an empty ACK without response.
 

Macro Definition Documentation

◆ CONFIG_GCOAP_DTLS_HANDSHAKE_TIMEOUT_MSEC

#define CONFIG_GCOAP_DTLS_HANDSHAKE_TIMEOUT_MSEC   (3 * MS_PER_SEC)

Timeout for the DTLS handshake process.

Set to 0 for infinite time

Definition at line 440 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 449 of file gcoap.h.

◆ CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS_TIMEOUT_MSEC

#define CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS_TIMEOUT_MSEC   (15 * MS_PER_SEC)

Timeout for freeing up a session when minimum number of available sessions is not given.

Definition at line 457 of file gcoap.h.

◆ CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS

#define CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS   ((CONFIG_COAP_ACK_TIMEOUT_MS / 4) * 3)

Timeout in milliseconds for the forward proxy to send an empty ACK without response.

Definition at line 48 of file forward_proxy.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 507 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_MS

Definition at line 539 of file gcoap.h.

◆ CONFIG_GCOAP_NON_TIMEOUT_MSEC

#define CONFIG_GCOAP_NON_TIMEOUT_MSEC   (5000U)

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

Set to 0 to disable timeout.

Definition at line 549 of file gcoap.h.

◆ CONFIG_GCOAP_OBS_CLIENTS_MAX

#define CONFIG_GCOAP_OBS_CLIENTS_MAX   (2)

Maximum number of Observe clients.

Note
As documented in this file, the implementation is limited to one observer per resource. Therefore, every stored observer is associated with a different resource. If you have only one observable resource, you could set this value to 1.

Definition at line 561 of file gcoap.h.

◆ CONFIG_GCOAP_OBS_NOTIFIERS_MAX

#define CONFIG_GCOAP_OBS_NOTIFIERS_MAX   (2)

Maximum number of local notifying endpoint addresses.

Note
As documented in this file, the implementation is limited to one observer per resource. Therefore, every stored local endpoint alias is associated with an observation context of a different resource. If you have only one observable resource, you could set this value to 1.

Definition at line 574 of file gcoap.h.

◆ CONFIG_GCOAP_OBS_REGISTRATIONS_MAX

#define CONFIG_GCOAP_OBS_REGISTRATIONS_MAX   (2)

Maximum number of registrations for Observable resources.

Note
As documented in this file, the implementation is limited to one observer per resource. Therefore, every stored observation context is associated with a different resource. If you have only one observable resource, you could set this value to 1.

Definition at line 586 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 619 of file gcoap.h.

◆ CONFIG_GCOAP_PDU_BUF_SIZE

#define CONFIG_GCOAP_PDU_BUF_SIZE   (128)

Size of the buffer used to build a CoAP request or response.

Definition at line 464 of file gcoap.h.

◆ CONFIG_GCOAP_PORT

#define CONFIG_GCOAP_PORT   (5683)

Server port; use RFC 7252 default if not defined.

Definition at line 427 of file gcoap.h.

◆ CONFIG_GCOAP_REQ_WAITING_MAX

#define CONFIG_GCOAP_REQ_WAITING_MAX   (2)

Maximum number of requests awaiting a response.

Definition at line 471 of file gcoap.h.

◆ CONFIG_GCOAP_RESEND_BUFS_MAX

#define CONFIG_GCOAP_RESEND_BUFS_MAX   (1)

Count of PDU buffers available for resending confirmable messages.

Definition at line 676 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 492 of file gcoap.h.

◆ CONFIG_GCOAPS_PORT

#define CONFIG_GCOAPS_PORT   (5684)

Secure Server port; use RFC 7252 default if not defined.

Definition at line 433 of file gcoap.h.