core library

Core implementation providing Scripting API implementations, interfaces for protocol bindings, and the Servient class which provides the WoT runtime used for consuming, exposing, and discovering Things.

Classes

AceCredentials
Credentials used for the AceSecurityScheme.
AceSecurityScheme
Experimental ACE Security Scheme.
Action
Class representing an Action Affordance in a Thing Description.
AdditionalExpectedResponse
Communication metadata describing the expected response message for the primary response.
ApiKeyCredentials
Credentials used for the ApiKeySecurityScheme.
ApiKeySecurityScheme
API key authentication security configuration identified by the Vocabulary Term apikey.
ArrayValue
A DataSchemaValue object wrapping multiple other DataSchemaValues.
AugmentedForm
A Form augmented with information from its associated _thingDescription and _interactionAffordance.
AuthServerRequestCreationHint
This is sent by an RS as a response to an Unauthorized Resource Request Message to help the sender of the Unauthorized Resource Request Message acquire a valid access token.
AutoSecurityScheme
An automatic security configuration identified by the vocabulary term auto.
BasicCredentials
Credentials used for the BasicSecurityScheme.
BasicSecurityScheme
Basic Authentication security configuration identified by the Vocabulary Term basic.
BearerCredentials
Credentials used for the BearerSecurityScheme.
BearerSecurityScheme
Bearer Token security configuration identified by the Vocabulary Term bearer.
BooleanValue
A DataSchemaValue object that wraps a bool.
ComboSecurityScheme
A combination of other security schemes identified by the Vocabulary Term combo (i.e., "scheme": "combo").
ConsumedThing
Represents a client API to operate a Thing. Belongs to the WoT Consumer conformance class.
Content
This class contains binary input or output data and indicates the media type this data is encoded in.
ContentCodec
Interface for providing a codec for a specific media type.
ContentSerdes
Class providing serializing and deserializing capabilities.
Context
Represents the JSON-LD @context of a Thing Description or Thing Model.
ContextEntry
Base class for @context entries.
CoreLinkFormatConfiguration
Configures discovery using the CoRE link format (RFC 6690).
CoreResourceDirectoryConfiguration
A configuration for performing discovery using a CoRE Resource Directory (RFC 9176).
Credentials
Base class used for defining credentials for Thing Interactions.
DataSchema
Metadata that describes the data format used. It can be used for validation.
DataSchemaValue<T>
Value corresponding to a WoT DataSchema as specified in section 7.1 of the WoT Scripting API specification.
DataSchemaValueInput
InteractionInput variant that wraps a DataSchemaValue.
DigestCredentials
Credentials used for the DigestSecurityScheme.
DigestSecurityScheme
Digest Access Authentication security configuration identified by the Vocabulary Term digest.
DirectConfiguration
A configuration used for direct discovery, i.e. the direct retrieval of a Thing Description from a uri.
DiscoveryConfiguration
A configuration that is used by the WoT.discover() method when registered with the underlying Servient.
DiscoveryContent
Content specific for discovery.
DnsSdDConfiguration
A DiscoveryConfiguration for performing DNS-based Service Discovery (RFC 6763) to obtain Thing Descriptions.
Event
Class representing an Event Affordance in a Thing Description.
ExpectedResponse
Communication metadata describing the expected response message for the primary response.
ExploreDirectoryConfiguration
A configuration that is used for retrieving Thing Descriptions from a Thing Description Directory (TDD).
ExposedThing
The ExposedThing interface is the server API to operate the Thing that allows defining request handlers, Property, Action, and Event interactions.
Form
Contains the information needed for performing interactions with a Thing.
IntegerValue
A DataSchemaValue object that wraps an int.
InteractionAffordance
Base class for Interaction Affordances (Properties, Actions, and Events).
InteractionInput
The (optional) input for an interaction.
InteractionOutput
Exposes the data obtained by Thing interactions.
Represents an element of the links array in a Thing Description.
MapContextEntry
Super class of @context entries that are key-value pairs.
MqttDiscoveryConfiguration
Experimental DiscoveryConfiguration that is used to perform discovery with the MQTT protocol.
NoSecurityScheme
A security configuration corresponding to identified by the Vocabulary Term nosec.
NullValue
A DataSchemaValue object that wraps a null value.
NumberValue
A DataSchemaValue object that wraps a num.
OAuth2Credentials
Credentials used for the OAuth2SecurityScheme.
OAuth2SecurityScheme
OAuth 2.0 authentication security configuration for systems conformant with RFC 6749, RFC 8252 and (for the device flow) RFC 8628, identified by the Vocabulary Term oauth2.
ObjectValue
A DataSchemaValue object wrapping a map of DataSchemaValues.
Property
Class representing a Property Affordance in a Thing Description.
ProtocolClient
Base class for a Protocol Client.
ProtocolClientFactory
Base class for a factory that produces ProtocolClients.
ProtocolServer
Base class for a Protocol Server.
ProtocolSubscription
Base class for implementations of the Subscription interface.
PskCredentials
Credentials used for the PskSecurityScheme.
PskSecurityScheme
Pre-shared key authentication security configuration identified by the Vocabulary Term psk.
SecurityScheme
Class that contains metadata describing the configuration of a security mechanism.
Servient
A software stack that implements the WoT building blocks.
SingleContextEntry
Represents a @context entry that contains a uri as its value and has no key defined.
StreamInput
InteractionInput variant that wraps a byteStream.
StringMapContextEntry
Key-value @context entry that contains a non-URI string as its value.
StringValue
A DataSchemaValue object that wraps a String.
Subscription
Represents a subscription to Property change and Event interactions.
ThingDescription
Represents a WoT Thing Description.
ThingDiscovery
Provides the properties and methods controlling the discovery process.
ThingDiscoveryProcess
Provides the properties and methods controlling the discovery process, and returning the results.
ThingFilter
Contains the constraints for discovering Things as key-value pairs.
ThingModel
Class representing a WoT Thing Model.
TwoStepConfiguration
Base class for configuring discovery mechanisms that involve a two-step approach.
UriMapContextEntry
Key-value @context entry that contains a uri as its value.
WoT
Interface for a WoT runtime.

Enums

DirectoryPayloadFormat
Enumeration for specifying the value of the format query parameter when using the exploreDirectory discovery method.
DiscoveryType
Used to indicate whether the discovery mechanism will be used to discover Thing Descriptions of Things or Thing Description Directories.
OperationType
Enumeration for the possible WoT operation types.
ProtocolType
The protocol type that is used for DNS-based service discovery.
SubscriptionType
Indicates the type of the subscription.

Mixins

CoreLinkFormatDiscoverer
Interfaces for clients that support discovery via the CoRE Link Format.
DirectDiscoverer
Interface for a client that is able to discoverDirectly, i.e. to retrieve a Thing Description from a given Uri via unicast.
MqttDiscoverer
Interface for performing experimental discovery using the MQTT protocol.
MulticastDiscoverer
Interface for a client that is able to discoverViaMulticast, i.e. to retrieve a Stream of Thing Descriptions from a given Uri via multicast.

Extensions

ArrayInteractionInputExtension on List<Object?>
Extension for simplifying the creation of DataSchemaValueInputs from array values.
BooleanInteractionInputExtension on bool
Extension for simplifying the creation of DataSchemaValueInputs from boolean values.
IntegerInteractionInputExtension on int
Extension for simplifying the creation of DataSchemaValueInputs from int values.
InternetAddressMethodExtension on Uri
Extension that makes it easier to handle Uris which potentially contain InternetAddresses.
NullInteractionInputExtension on Null
Extension for simplifying the creation of DataSchemaValueInputs from null values.
NumberInteractionInputExtension on num
Extension for simplifying the creation of DataSchemaValueInputs from num values.
ObjectInteractionInputExtension on Map<String, Object?>
Extension for simplifying the creation of DataSchemaValueInputs from object values.
StringInteractionInputExtension on String
Extension for simplifying the creation of DataSchemaValueInputs from String values.
ToThingDescription on Map<String, dynamic>
Extension for generating ThingDescriptions from Maps more easily.

Constants

aceSecuritySchemeName → const String
Indicates the scheme value for identifying AceSecuritySchemes.
apiKeySecuritySchemeName → const String
Indicates the scheme value for identifying ApiKeySecuritySchemes.
autoSecuritySchemeName → const String
Indicates the scheme value for identifying AutoSecuritySchemes.
basicSecuritySchemeName → const String
Indicates the scheme value for identifying BasicSecuritySchemes.
bearerSecuritySchemeName → const String
Indicates the scheme value for identifying BearerSecuritySchemes.
comboSecuritySchemeName → const String
Indicates the scheme value for identifying ComboSecuritySchemes.
defaultMediaType → const String
Defines application/json as the default content type.
digestSecuritySchemeName → const String
Indicates the scheme value for identifying DigestSecuritySchemes.
nosecSecuritySchemeName → const String
Indicates the scheme value for identifying NoSecuritySchemes.
oAuth2SecuritySchemeName → const String
Indicates the scheme value for identifying OAuth2SecuritySchemes.
pskSecuritySchemeName → const String
Indicates the scheme value for identifying PskSecuritySchemes.

Typedefs

AceSecurityCallback = Future<AceCredentials?> Function(Uri uri, Form? form, AuthServerRequestCreationHint? creationHint, AceCredentials? invalidAceCredentials)
Function signature for an asynchronous callback for providing client AceCredentials at runtime, based on an optional creationHint given by the Resource Server. This creation hint has to be parsed by the library user.
ActionHandler = Future<void> Function(InteractionOutput params, {Object? data, int? formIndex, Map<String, Object>? uriVariables})
A function that is called when an external request for invoking an Action is received and defines what to do with such requests.
AsyncClientSecurityCallback<T extends Credentials> = Future<T?> Function(Uri uri, AugmentedForm? form, T? invalidCredentials)
Function signature for an asynchronous callback for providing client Credentials at runtime.
ClientPskCallback = PskCredentials? Function(Uri uri, Form? form, String? identityHint)
Function signature for a synchronous callback for providing client PskCredentials at runtime.
ErrorListener = void Function(Exception data)
User provided callback that is given an argument of type Error and is used for conveying critical and non-critical errors from the Protocol Bindings to applications.
EventListenerHandler = Future<InteractionInput> Function()
A function that is called when an associated Event is triggered and provides the data to be sent with the Event to subscribers.
EventSubscriptionHandler = Future<void> Function({Object? data, int? formIndex, Map<String, Object>? uriVariables})
A function that is called when an external request for subscribing to an Event is received and defines what to do with such requests.
ExposedThingInit = Map<String, dynamic>
Dictionary used for the initialization of an exposed Thing.
InteractionListener = void Function(InteractionOutput data)
User provided callback that is given an argument of type InteractionOutput and is used for observing Property changes and handling Event notifications.
PropertyReadHandler = Future<InteractionInput> Function({Object? data, int? formIndex, Map<String, Object>? uriVariables})
A function that is called when an external request for reading a Property is received and defines what to do with such requests.
PropertyReadMap = Map<String, InteractionOutput>
Maps multiple InteractionOutputs to property names.
PropertyWriteHandler = Future<void> Function(InteractionOutput value, {Object? data, int? formIndex, Map<String, Object>? uriVariables})
A function that is called when an external request for writing a Property is received and defines what to do with such requests.
PropertyWriteMap = Map<String, InteractionInput>
Maps multiple InteractionInputs to property names.
ServerSecurityCallback = Map<String, Credentials> Function(String id)
Function signature for a synchronous callback retrieving server Credentials by Thing id at runtime.

Exceptions / Errors

DartWotException
Base class for custom exceptions defined in dart_wot.
DiscoveryException
Custom Exception that is thrown when the discovery process fails.
NotReadableException
Indicates that an I/O read operation failed.