Skip to content

Resolvers

Ricardo Minguez (Rido) edited this page Sep 21, 2020 · 9 revisions

Resolution is the process of getting all required interfaces associated to a given dtmi.

Models available in the Model Repo can be resolved by Model Resolver Client (s) using a signature similar like:

string[] dtdlInterfaces = resolver('dtmi:com:example:TemperatureController;1')

The resolver is responsible for:

  1. Allow to configure different Model Repositories (federation)
  2. If none is configured , it will use the Public Device Model Repository by default
  3. Convert the DTMI to a relative path, as described in the Resolution-Convention
  4. All interface dependencies, from extends and @Component will be retrieved from
    1. A .expanded.json file with all the dependencies already flattened in an array
    2. Calculating the dependencies using the expand algorithm in the client
  5. Allow to acquire the interfaces ahead of time (before parsing)
  6. Allow to configure the DTDL parser to resolve on demand

Calculate Dependencies

DTDL v2 allows to reference external interfaces in extends and @Component, there is only one level of nested @Component, extends can have multiple levels and can contain components.

Clone this wiki locally