CoapCode class

Models CoAP codes as described in RFC 7252, section 3.

Can decode the codes empty messages, requsts, responses, and signaling messages.

Annotations
  • @immutable

Constructors

CoapCode(int codeClass, int codeDetail, String description)
const

Properties

code int
An 8-bit representation combining the codeClass and the codeDetail.
final
codeClass int
The code class of this CoapCode (in the range of 0 to 7).
final
codeDetail int
The code detail of this CoapCode (in the range of 0 to 31).
final
description String
A human-readable description of this ResponseCode.
final
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Checks whether this CoapCode indicates an empty message.
no setter
isErrorResponse bool
Checks whether this CoapCode represents a client error response code.
no setter
isRequest bool
Checks whether this CoapCode indicates a request message.
no setter
isResponse bool
Checks whether this CoapCode indicates a response message.
no setter
isServerError bool
Checks whether this CoapCode represents a server error response code.
no setter
isSignaling bool
Checks whether this CoapCode indicates a signaling message.
no setter
isSuccess bool
Checks whether this CoapCode represents a success response code.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

decode(int code) CoapCode?

Constants

bitLength → const int
Code bit length