ProsecCoAP 🥂
 
Loading...
Searching...
No Matches
NonConfigurableConstants

CoAP constants that cannot be overridden. More...

Functions

constexpr uint8_t COAP_CODE_ENCODE (uint8_t class_, uint8_t detail)
 Helper to encode class and detail into a 8-bit response code as defined in RFC 7252.
 

Variables

constexpr uint8_t COAP_VERSION = 0x01
 The CoAP version.
 
constexpr uint8_t COAP_HEADER_SIZE = 4
 The size of the CoAP header in bytes.
 
constexpr uint8_t COAP_PAYLOAD_MARKER = 0xFF
 The payload marker byte.
 
constexpr uint16_t COAP_DEFAULT_PORT = 5683
 The default CoAP port number.
 
constexpr uint8_t COAP_MAX_TOKEN_LENGTH = 8
 The maximum length of a CoAP token.
 

Detailed Description

CoAP constants that cannot be overridden.

These are non-overridable constants. Either defined by the CoAP specification or derived from it.

Refer to each constant's documentation for details.

Function Documentation

◆ COAP_CODE_ENCODE()

uint8_t COAP_CODE_ENCODE ( uint8_t class_,
uint8_t detail )
constexpr

Helper to encode class and detail into a 8-bit response code as defined in RFC 7252.

Variable Documentation

◆ COAP_DEFAULT_PORT

uint16_t COAP_DEFAULT_PORT = 5683
constexpr

The default CoAP port number.

As per RFC 7252, the default port for CoAP is 5683. The the CoAP instance may define a different port.

◆ COAP_HEADER_SIZE

uint8_t COAP_HEADER_SIZE = 4
constexpr

The size of the CoAP header in bytes.

◆ COAP_MAX_TOKEN_LENGTH

uint8_t COAP_MAX_TOKEN_LENGTH = 8
constexpr

The maximum length of a CoAP token.

See also https://datatracker.ietf.org/doc/html/rfc7252#section-5.3.1.

◆ COAP_PAYLOAD_MARKER

uint8_t COAP_PAYLOAD_MARKER = 0xFF
constexpr

The payload marker byte.

◆ COAP_VERSION

uint8_t COAP_VERSION = 0x01
constexpr

The CoAP version.

CoAP version as per RFC 7252.