coap library

Classes

AcceptOption
Block1Option
Block2Option
CoapBlockOption
This class describes the block options of the CoAP messages
CoapClient
Provides convenient methods for accessing CoAP resources. This class provides a fairly high level interface for the majority of simple CoAP requests but because of this is fairly coarsely grained. Much finer control of a request can be achieved by direct construction and manipulation of a CoapRequest itself, however this is more involved, for most cases the API in this class should suffice.
CoapConfigAll
Configuration loading class. The config file itself is a YAML file. The configuration items below are marked as optional to allow the config file to contain only those entries that override the defaults. The file can't be empty, so version must as a minimum be present.
CoapConfigDefault
Configuration loading class. The config file itself is a YAML file. The configuration items below are marked as optional to allow the config file to contain only those entries that override the defaults. The file can't be empty, so version must as a minimum be present.
CoapConfigOpenssl
Configuration loading class. The config file itself is a YAML file. The configuration items below are marked as optional to allow the config file to contain only those entries that override the defaults. The file can't be empty, so version must as a minimum be present.
CoapConfigTinydtls
Configuration loading class. The config file itself is a YAML file. The configuration items below are marked as optional to allow the config file to contain only those entries that override the defaults. The file can't be empty, so version must as a minimum be present.
CoapConstants
Package wide constants
CoapLinkAttribute
Class for linkformat attributes.
CoapLinkFormat
This class provides link format definitions as specified in RFC 6690.
CoapMulticastResponseHandler
Response event handler for multicast responses
CoapObserveClientRelation
Represents a CoAP observe relation between a CoAP client and a resource on a server. Provides a simple API to check whether a relation has successfully established and to cancel or refresh the relation.
CoapRequest
This class describes the functionality of a CoAP Request as a subclass of a CoAP Message. It provides:
CoapResource
Interface for a resource
CoapResponse
Represents a CoAP response to a CoAP request. A response is either a piggy-backed response with type ACK or a separate response with type CON or NON.
This class can be used to programmatically browse a remote CoAP endoint.
ContentFormatOption
CropRotationDeduplicator
Crop rotation deduplicator
Deduplicator
Provides methods to detect duplicates. Note that CONs and NONs can be duplicates.
DefaultCoapConfig
Configuration loading class. The config file itself is a YAML file. The configuration items below are marked as optional to allow the config file to contain only those entries that override the defaults. The file can't be empty, so version must as a minimum be present.
EcdsaKeys
Class representing ECC keys (one private key and the x and y coordinates of a public one).
EchoOption
The Echo Option provides a lightweight challenge-response mechanism for CoAP that enables a CoAP server to verify the freshness of a request.
EdhocOption
EmptyOption
ETagOption
HopLimitOption
IfMatchOption
IfNoneMatchOption
IntegerOption
LocationPathOption
LocationQueryOption
MaxAgeOption
NoopDeduplicator
A dummy implementation that does no deduplication.
NoResponseOption
ObserveOption
Option for observing resources with CoAP.
OcfAcceptContentFormatVersion
OcfContentFormatVersion
OpaqueOption
Option<T>
This class describes the options of the CoAP messages.
OscoreOption
OscoreOptionClassE
Interface for an Oscore class E option (encrypted and integrity protected). See RFC 8613, section 4.1.1.
OscoreOptionClassI
Interface for an Oscore class I option (integrity protected only). See RFC 8613, section 4.1.2.
OscoreOptionClassU
Interface for an Oscore class U option (unprotected). See RFC 8613, section 4.1.2.
OscoreOptionValue
ProxySchemeOption
ProxyUriOption
PskCredentials
Credentials used for PSK Cipher Suites consisting of an identity and a preSharedKey.
QBlock1Option
QBlock2Option
RequestTagOption
The Request-Tag Option can be used for identifying request bodies, similar to the ETagOption , but ephemeral and set by the CoAP client.
Size1Option
Size2Option
StringOption
SweepDeduplicator
Sweep deduplicator
TinyDTLS
ffi binding to the tinydtls library.
UriHostOption
UriPathOption
UriPortOption
UriQueryOption

Enums

BlockOptionType
BlockSize
Enum representing the valid SZX values of CoapBlockOptions.
CoapCode
CoapMediaType
This enum describes the CoAP Media Type Registry as defined in RFC 7252, Section 12.3.
CoapMessageType
Types of CoAP messages.
DtlsBackend
EcdsaCurve
Enumeration of the supported elliptic curves.
LinkFormatParameter
LinkFormatParameterType
MatchEtags
The matching scheme to use for supplied ETags on PUT
MulticastAddress
Defines well-known multicast addresses from RFC 7252 and RFC 9176.
ObserveRegistration
Models the legal values for including the ObserveOption an a CoAP GET request.

Typedefs

PskCredentialsCallback = PskCredentials Function(Uint8List identityHint)
Function signature for a callback function for retrieving/generating PskCredentials.

Exceptions / Errors

CoapRequestCancellationException
This Exception is thrown when a CoAP request has timed out.
CoapRequestException
Generic class for Exceptions that are thrown when a CoAP request fails.
CoapRequestTimeoutException
This Exception is thrown when a CoAP request has timed out.