-
Notifications
You must be signed in to change notification settings - Fork 18
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:
- Allow to configure different Model Repositories (federation)
- If none is configured , it will use the Public Device Model Repository by default
- Convert the DTMI to a relative path, as described in the Resolution-Convention
- All interface dependencies, from
extends
and@Component
will be retrieved from- A
.expanded.json
file with all the dependencies already flattened in an array - Calculating the dependencies using the
expand
algorithm in the client
- A
- Allow to acquire the interfaces ahead of time (before parsing)
- Allow to configure the DTDL parser to resolve on demand
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.