Represents the option of a CoapPdu. More...
Header: | #include <CoapOption> |
enum | Option { IfMatch, UriHost, ETag, IfNoneMatch, ..., Size1 } |
CoapOption() | |
QByteArray | data() const |
Option | option() const |
void | setData(const QByteArray & data) |
void | setOption(const CoapOption::Option & option) |
Represents the option of a CoapPdu.
The CoapOption class provides an easy way to create / parse CoAP options of a CoapPdu (Protocol Data Unit). An options can be compared with a HTTP header.
Represents the known CoAP options according to RFC7252.
Constant | Value | Description |
---|---|---|
CoapOption::IfMatch | 1 | |
CoapOption::UriHost | 3 | |
CoapOption::ETag | 4 | |
CoapOption::IfNoneMatch | 5 | |
CoapOption::Observe | 6 | https://tools.ietf.org/html/rfc7641 |
CoapOption::UriPort | 7 | |
CoapOption::LocationPath | 8 | |
CoapOption::UriPath | 11 | |
CoapOption::ContentFormat | 12 | |
CoapOption::MaxAge | 14 | |
CoapOption::UriQuery | 15 | |
CoapOption::Accept | 17 | |
CoapOption::LocationQuery | 20 | |
CoapOption::Block2 | 23 | https://tools.ietf.org/html/draft-ietf-core-block-18 |
CoapOption::Block1 | 27 | https://tools.ietf.org/html/draft-ietf-core-block-18 |
CoapOption::ProxyUri | 35 | |
CoapOption::ProxyScheme | 39 | |
CoapOption::Size1 | 60 |
Constructs a CoapOption.
Returns the data of this CoapOption.
See also setData().
Returns the option value of this CoapOption.
See also setOption().
Sets the data of this CoapOption to the given data.
See also data().
Sets the option of this CoapOption to the given parameter.
See also option().