coap library

Classes

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
CoapCropRotationDeduplicator
Crop rotation deduplicator
CoapDefinedAddress
Defines standard addresses from RFC7252
CoapIDeduplicator
Provides methods to detect duplicates. Note that CONs and NONs can be duplicates.
CoapIResource
Interface for a resource
CoapLinkAttribute
Class for linkformat attributes.
CoapLinkFormat
This class provides link format definitions as specified in RFC 6690.
CoapMulticastResponseHandler
Response event handler for multicast responses
CoapNoopDeduplicator
A dummy implementation that does no deduplication.
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.
CoapOption
This class describes the options of the CoAP messages.
CoapRequest
This class describes the functionality of a CoAP Request as a subclass of a CoAP Message. It provides:
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.
CoapSweepDeduplicator
Sweep deduplicator
This class can be used to programmatically browse a remote CoAP endoint.
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).
PskCredentials
Credentials used for PSK Cipher Suites consisting of an identity and a preSharedKey.
TinyDTLS
ffi binding to the tinydtls library.

Enums

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
OptionFormat
CoAP option formats.
OptionType
CoAP option types as defined in RFC 7252, Section 12.2 and other CoAP extensions.

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.
UnknownCriticalOptionException
Exception that is thrown when an unknown critical CoapOption number is encountered during the parsing of a CoapMessage.
UnknownElectiveOptionException
Exception that is thrown when an unknown elective CoapOption number is encountered during the parsing of a CoapMessage.
UnknownOptionException
Base class for Exceptions that are thrown when an unknown CoapOption number is encountered during the parsing of a CoapMessage.