|
SatCat5
|
Message parsing for the Constrained Applications Protocol (CoAP)
This file implements message parsing for the Constrained Applications Protocol (CoAP) defined in IETF RFC-7252: https://www.rfc-editor.org/rfc/rfc7252
The coap::Reader object is typically ephemeral:
Any of these actions, including object creation, may trigger an error. The error state can be checked via the error() function. If errored, error_code() MUST return a the correct response code for the error, or CODE_EMPTY if a Reset is required, and error_msg() MAY contain a diagnostic payload.
Options are parsed by the coap::Reader::read_options() method. Children of coap::Reader MUST call this method in their constructor. The coap::Reader class handles several CoAP options itself; other options of interest MAY be supported in child classes by overriding the read_user_option() method. If adding vendor-specific options, the chosen Option Number(s) MUST be in the range [2048, 65000) per RFC7252 ยง12.2.
Definition in file coap_reader.h.
Go to the source code of this file.
Classes | |
| class | satcat5::coap::Option |
| Accessor for a single CoAP option field. More... | |
| class | satcat5::coap::ReadHeader |
| Parser for CoAP message headers only. More... | |
| class | satcat5::coap::Reader |
| Base-class for parsing CoAP message headers and options. More... | |
| class | satcat5::coap::ReadSimple |
| Wrapper for coap::ReadOptions that automatically parses options, rejecting any message with unrecognized Critical options. More... | |
Macros | |
| #define | SATCAT5_COAP_MAX_URI_PATH_LEN 64 |