OptionType enum

CoAP option types as defined in RFC 7252, Section 12.2 and other CoAP extensions.

Inheritance
Implemented types

Constructors

OptionType(int optionNumber, String optionName, OptionFormat optionFormat)
const

Values

ifMatch → const OptionType

C, opaque, 0-8 B, -

const OptionType(1, 'If-Match', OptionFormat.opaque)
uriHost → const OptionType

C, String, 1-270 B, ""

const OptionType(3, 'Uri-Host', OptionFormat.string)
eTag → const OptionType

E, sequence of bytes, 1-4 B, -

const OptionType(4, 'ETag', OptionFormat.opaque)
ifNoneMatch → const OptionType
const OptionType(5, 'If-None-Match', OptionFormat.empty)
observe → const OptionType

E, Duration, 1 B, 0

const OptionType(6, 'Observe', OptionFormat.integer)
uriPort → const OptionType

C, uint, 0-2 B

const OptionType(7, 'Uri-Port', OptionFormat.integer)
locationPath → const OptionType

E, String, 1-270 B, -

const OptionType(8, 'Location-Path', OptionFormat.string)
oscore → const OptionType

C, String, 0-255 B, -

Defined in RFC 8613.

const OptionType(9, 'OSCORE', OptionFormat.opaque)
uriPath → const OptionType

C, String, 1-270 B, ""

const OptionType(11, 'Uri-Path', OptionFormat.string)
contentFormat → const OptionType

C, 8-bit uint, 1 B, 0 (text/plain)

const OptionType(12, 'Content-Format', OptionFormat.integer)
maxAge → const OptionType

E, variable length, 1--4 B, 60 Seconds

const OptionType(14, 'Max-Age', OptionFormat.integer)
uriQuery → const OptionType

C, String, 1-270 B, ""

const OptionType(15, 'Uri-Query', OptionFormat.string)
hopLimit → const OptionType

E, uint, 1 B, 16

Defined in RFC 8768.

const OptionType(16, 'Hop-Limit', OptionFormat.integer)
accept → const OptionType

C, Sequence of Bytes, 1-n B, -

const OptionType(17, 'Accept', OptionFormat.integer)
qBlock1 → const OptionType

C, uint, 0-3 B, -

Defined in RFC 9177.

const OptionType(19, 'Q-Block1', OptionFormat.integer)
edhoc → const OptionType

C, empty, 0 B, -

Defined in draft-ietf-core-oscore-edhoc-02.

Note: The registration of this option is only temporary at the moment and might be removed by IANA if draft-ietf-core-oscore-edhoc does not become an RFC.

const OptionType(21, 'EDHOC', OptionFormat.empty)
locationQuery → const OptionType

E, String, 1-270 B, -

const OptionType(20, 'Location-Query', OptionFormat.string)
block2 → const OptionType
const OptionType(23, 'Block2', OptionFormat.integer)
block1 → const OptionType
const OptionType(27, 'Block1', OptionFormat.integer)
size2 → const OptionType
const OptionType(28, 'Size2', OptionFormat.integer)
qBlock2 → const OptionType

C, uint, 0-3 B, -

Defined in RFC 9177.

const OptionType(31, 'Q-Block2', OptionFormat.integer)
proxyUri → const OptionType

C, String, 1-270 B, "coap"

const OptionType(35, 'Proxy-Uri', OptionFormat.string)
proxyScheme → const OptionType
const OptionType(39, 'Proxy-Scheme', OptionFormat.string)
size1 → const OptionType
const OptionType(60, 'Size1', OptionFormat.integer)
echo → const OptionType

E, opaque, 1-40 B, -

Defined in RFC 9175.

const OptionType(252, 'Echo', OptionFormat.opaque)
noResponse → const OptionType

E, uint, 0-1 B, 0

Defined in RFC 7967, updated by RFC 8613.

const OptionType(258, 'No-Response', OptionFormat.integer)
requestTag → const OptionType

E, opaque, 0-8 B, -

Defined in RFC 9175.

const OptionType(292, 'Request-Tag', OptionFormat.opaque)
ocfAcceptContentFormatVersion → const OptionType

C, uint, 2 B, -

Defined in the OCF Core Specification v1.3.0 Part 1, page 128.

const OptionType(2049, 'OCF-Accept-Content-Format-Version', OptionFormat.integer)
ocfContentFormatVersion → const OptionType

C, uint, 2 B, -

Defined in the OCF Core Specification v1.3.0 Part 1, page 128.

const OptionType(2053, 'OCF-Content-Format-Version', OptionFormat.integer)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isCritical bool
Checks whether an option is critical.
no setter
isElective bool
Checks whether an option is elective.
no setter
isSafe bool
Checks whether an option is safe.
no setter
isUnsafe bool
Checks whether an option is unsafe.
no setter
optionFormat OptionFormat
The OptionFormat of this option (integer, string, opaque, or unknown).
final
optionName String
The name of this option.
final
optionNumber int
The number of this option.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(OptionType other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromTypeNumber(int type) OptionType
Creates a new OptionType object from a numeric type.

Constants

values → const List<OptionType>
A constant List of the values in this enum, in order of their declaration.