SatCat5
coap_constants.h File Reference

Detailed Description

Constants relating to the Constrained Applications Protocol (CoAP)

This file defines useful constants for working with the Constrained Applications Protocol (CoAP) defined in IETF RFC-7252: https://www.rfc-editor.org/rfc/rfc7252

Definition in file coap_constants.h.

#include <satcat5/types.h>
Include dependency graph for coap_constants.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  satcat5::coap::Code
 CoAP message header CODE field (Section 12.1). More...
 

Functions

constexpr Code satcat5::coap::CODE_EMPTY (0, 0)
 
constexpr Code satcat5::coap::CODE_GET (0, 1)
 < 0.00 Empty message
 
constexpr Code satcat5::coap::CODE_POST (0, 2)
 < 0.01 GET request
 
constexpr Code satcat5::coap::CODE_PUT (0, 3)
 < 0.02 POST request
 
constexpr Code satcat5::coap::CODE_DELETE (0, 4)
 < 0.03 PUT request More...
 
constexpr Code satcat5::coap::CODE_CREATED (2, 1)
 
constexpr Code satcat5::coap::CODE_DELETED (2, 2)
 < 2.01 Created
 
constexpr Code satcat5::coap::CODE_VALID (2, 3)
 < 2.02 Deleted
 
constexpr Code satcat5::coap::CODE_CHANGED (2, 4)
 < 2.03 Valid
 
constexpr Code satcat5::coap::CODE_CONTENT (2, 5)
 < 2.04 Changed
 
constexpr Code satcat5::coap::CODE_CONTINUE (2, 31)
 < 2.05 Content
 
constexpr Code satcat5::coap::CODE_BAD_REQUEST (4, 0)
 < 2.31 Continue
 
constexpr Code satcat5::coap::CODE_UNAUTHORIZED (4, 1)
 < 4.00 Bad Request
 
constexpr Code satcat5::coap::CODE_BAD_OPTION (4, 2)
 < 4.01 Unauthorized
 
constexpr Code satcat5::coap::CODE_FORBIDDEN (4, 3)
 < 4.02 Bad Option
 
constexpr Code satcat5::coap::CODE_NOT_FOUND (4, 4)
 < 4.03 Forbidden
 
constexpr Code satcat5::coap::CODE_BAD_METHOD (4, 5)
 < 4.04 Not Found
 
constexpr Code satcat5::coap::CODE_NOT_ACCEPT (4, 6)
 < 4.05 Method Not Allowed
 
constexpr Code satcat5::coap::CODE_PRECND_FAIL (4, 12)
 < 4.06 Not Acceptable
 
constexpr Code satcat5::coap::CODE_TOO_LARGE (4, 13)
 < 4.12 Precondition Failed
 
constexpr Code satcat5::coap::CODE_BAD_FORMAT (4, 15)
 < 4.13 Request Entity Too Large
 
constexpr Code satcat5::coap::CODE_SERVER_ERROR (5, 0)
 < 4.15 Unsupported Content-Format
 
constexpr Code satcat5::coap::CODE_NOT_IMPL (5, 1)
 < 5.00 Internal Server Error
 
constexpr Code satcat5::coap::CODE_BAD_GATEWAY (5, 2)
 < 5.01 Not Implemented
 
constexpr Code satcat5::coap::CODE_UNAVAILABLE (5, 3)
 < 5.02 Bad Gateway
 
constexpr Code satcat5::coap::CODE_GATE_TIMEOUT (5, 4)
 < 5.03 Service Unavailable
 
constexpr Code satcat5::coap::CODE_NO_PROXY (5, 5)
 < 5.04 Gateway Timeout More...
 

Variables

constexpr u8 satcat5::coap::PAYLOAD_MARKER = 255
 CoAP message header VERSION and TYPE fields (Section 3).
 
constexpr u8 satcat5::coap::TYPE_CON = 0x00
 
constexpr u8 satcat5::coap::TYPE_NON = 0x10
 
constexpr u8 satcat5::coap::TYPE_ACK = 0x20
 
constexpr u8 satcat5::coap::TYPE_RST = 0x30
 
constexpr u8 satcat5::coap::VERSION1 = (1 << 6)
 
constexpr u16 satcat5::coap::OPTION_IF_MATCH = 1
 Option: If-Match.
 
constexpr u16 satcat5::coap::OPTION_URI_HOST = 3
 Option: Uri-Host.
 
constexpr u16 satcat5::coap::OPTION_ETAG = 4
 Option: ETag.
 
constexpr u16 satcat5::coap::OPTION_IF_NONE = 5
 Option: If-None-Match.
 
constexpr u16 satcat5::coap::OPTION_URI_PORT = 7
 Option: Uri-Port.
 
constexpr u16 satcat5::coap::OPTION_LOC_PATH = 8
 Option: Location-Path.
 
constexpr u16 satcat5::coap::OPTION_URI_PATH = 11
 Option: Uri-Path.
 
constexpr u16 satcat5::coap::OPTION_FORMAT = 12
 Option: Content-Format.
 
constexpr u16 satcat5::coap::OPTION_MAX_AGE = 14
 Option: Max-Age.
 
constexpr u16 satcat5::coap::OPTION_URI_QUERY = 15
 Option: Uri-Query.
 
constexpr u16 satcat5::coap::OPTION_ACCEPT = 17
 Option: Accept.
 
constexpr u16 satcat5::coap::OPTION_LOC_QUERY = 20
 Option: Location-Query.
 
constexpr u16 satcat5::coap::OPTION_BLOCK2 = 23
 Option: Block transfer (RFC7959)
 
constexpr u16 satcat5::coap::OPTION_BLOCK1 = 27
 Option: Block transfer (RFC7959)
 
constexpr u16 satcat5::coap::OPTION_PROXY_URI = 35
 Option: Proxy-Uri.
 
constexpr u16 satcat5::coap::OPTION_PROXY_SCH = 39
 Option: Proxy-Scheme.
 
constexpr u16 satcat5::coap::OPTION_SIZE1 = 60
 Option: Size1.
 
constexpr u16 satcat5::coap::FORMAT_TEXT = 0
 text/plain;charset=utf-8
 
constexpr u16 satcat5::coap::FORMAT_LINK = 40
 application/link-format
 
constexpr u16 satcat5::coap::FORMAT_XML = 41
 application/xml
 
constexpr u16 satcat5::coap::FORMAT_BYTES = 42
 application/octet-stream
 
constexpr u16 satcat5::coap::FORMAT_EXI = 47
 application/exi
 
constexpr u16 satcat5::coap::FORMAT_JSON = 50
 application/json
 
constexpr u16 satcat5::coap::FORMAT_CBOR = 60
 application/cbor (RFC8949)
 
constexpr u16 satcat5::coap::FORMAT_CBOR_SEQ = 63
 application/cbor-seq (RFC8742)
 

Function Documentation

◆ CODE_DELETE()

constexpr Code satcat5::coap::CODE_DELETE ( ,
 
)

< 0.03 PUT request

0.04 DEL request

◆ CODE_NO_PROXY()

constexpr Code satcat5::coap::CODE_NO_PROXY ( ,
 
)

< 5.04 Gateway Timeout

5.05 Proxying Not Supported