Elastacloud.DigiTwin.SDK
0.0.0.1
See the version list below for details.
dotnet add package Elastacloud.DigiTwin.SDK --version 0.0.0.1
NuGet\Install-Package Elastacloud.DigiTwin.SDK -Version 0.0.0.1
<PackageReference Include="Elastacloud.DigiTwin.SDK" Version="0.0.0.1" />
paket add Elastacloud.DigiTwin.SDK --version 0.0.0.1
#r "nuget: Elastacloud.DigiTwin.SDK, 0.0.0.1"
// Install Elastacloud.DigiTwin.SDK as a Cake Addin #addin nuget:?package=Elastacloud.DigiTwin.SDK&version=0.0.0.1 // Install Elastacloud.DigiTwin.SDK as a Cake Tool #tool nuget:?package=Elastacloud.DigiTwin.SDK&version=0.0.0.1
Introduction
An SDK wrapper around Azure Digital Twins SDK that provides additional best practices around versioning, query helpers, fluent access to creation.
Versioning
Digital Twin instances are typed. These types are described by DTDL models which can be versioned. You should keep your DTDL in JSON files, git control them and then target a deployment in an automated way.
The main challenges facing us with Versioning are:
- How do we keep digital twin instance matching the desired version of the DTDL model?
- We may want migrate digital twin instances to new versions of DTDL models over time or there may be a migration process, such as adding a value for a new property
- When working with digital twin instances in client code (e.g. C#) how do we map the digital twin instance to the appropriate POCO? (Or, perhaps, is there one POCO that subsumes all versions?)
This repo provides a dotnet tool
, a Global Tool to assist in the validation and deployment of Azure Digital Twin models. It has multiple modes, as described below.
Installation
dotnet tool install twinmigration
Validation
Purpose: To generate Markdown compatible tables of DTDL compliance between a source input path and a target ADT.
You can execute it in a number of ways:
- Source Input Files to Target ADT - allows you to ask "what is deployed that is different to my local DTML?"
- Source Input Files to Target Input Files - allows you to ask "what is different two sets of DTDL files held locally?"
- Source ADT to Target ADT - allows you to ask "what is deployed differently between these ADT instances?"
- Source ADT to Target Input Files - allows you to ask "what is different from the deployment to my local DTML?"
Usage
twinmigration validate --source-input-path C:\DTDL\Latest --target-twin-instance https://[myTwinInstance].api.weu.digitaltwins.azure.net
Example Output
ModelValidated | Success | Message |
---|---|---|
dtmi:digitaltwins:rec_3_3:core:Agent;2 | False | The model dtmi:digitaltwins:rec_3_3:core:Agent;2 isn't in the target environment |
dtmi:digitaltwins:rec_3_3:core:Asset;1 | False | The model dtmi:digitaltwins:rec_3_3:core:Asset;1 isn't in the target environment |
dtmi:digitaltwins:rec_3_3:core:BuildingComponent;1 | False | The model dtmi:digitaltwins:rec_3_3:core:BuildingComponent;1 isn't in the target environment |
Deployment
twinmigration deploy --source-input-path C:\DTDL\Latest --target-twin-instance https://[myTwinInstance].api.weu.digitaltwins.azure.net
This will take all the Models defined in the --source-input-path and apply them to the target instance.
Available flags:
-f
--force
will skip local validation code and attempt the full deployment-c
--strict
will cause local validation to fail if there is a version update that skips a version, for example from dtmi:elastacloud:code;1 to dtmi:elastacloud:code;3.
Decommission
twinmigration decommission --target-twin-instance https://[myTwinInstance].api.weu.digitaltwins.azure.net
This will take all the Models defined in the target Azure Digital Twin and will decommission it, if there is a later version of the model available. This means we can deploy new models, have runtime code still able to target old models while the runtime code is being updated, and then have the old models decommissioned when the runtime code has been replaced.
Available Flags:
-o
--tolerance
default 1, controls how many versions out of date a model must be before it is selected for decommissioning. For instance ifdtmi:elastacloud:code;4
exists and running with tolerance of2
will decommissiondtmi:elastacloud:code;1
anddtmi:elastacloud:code;2
Query Helpers
This repo provides a dotnet package
to assist in the runtime management of these versions, to provide a POCO for acting as a container for the instance data, and validating POCOs against deployed DTDL instances.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Azure.DigitalTwins.Core (>= 1.2.0)
- Azure.identity (>= 1.3.0)
- Microsoft.Azure.DigitalTwins.Parser (>= 3.12.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.8 | 128 | 4/26/2024 |
3.1.7 | 1,024 | 2/5/2024 |
3.1.6 | 100 | 2/1/2024 |
3.1.5 | 94 | 1/31/2024 |
3.1.4 | 173 | 6/12/2023 |
3.1.2 | 8,103 | 11/22/2022 |
3.1.1 | 392 | 10/5/2022 |
3.0.12 | 2,676 | 7/28/2022 |
3.0.11 | 566 | 7/20/2022 |
3.0.10 | 988 | 6/10/2022 |
3.0.9 | 574 | 6/9/2022 |
3.0.8 | 942 | 4/28/2022 |
3.0.7 | 690 | 4/27/2022 |
3.0.6 | 529 | 4/26/2022 |
3.0.5 | 524 | 4/21/2022 |
3.0.4 | 524 | 4/14/2022 |
3.0.3 | 633 | 4/14/2022 |
3.0.2 | 528 | 4/14/2022 |
2.0.15 | 989 | 3/25/2022 |
2.0.14 | 579 | 3/21/2022 |
2.0.13 | 783 | 2/24/2022 |
2.0.12 | 698 | 2/14/2022 |
2.0.11 | 625 | 2/3/2022 |
2.0.1 | 696 | 1/5/2022 |
1.0.61 | 529 | 11/16/2021 |
1.0.60 | 493 | 11/9/2021 |
1.0.59 | 448 | 11/4/2021 |
1.0.58 | 421 | 10/29/2021 |
1.0.57 | 415 | 10/27/2021 |
1.0.56 | 849 | 9/27/2021 |
1.0.55 | 436 | 9/7/2021 |
1.0.54 | 617 | 7/29/2021 |
1.0.53 | 432 | 7/29/2021 |
1.0.52 | 470 | 7/28/2021 |
1.0.51 | 498 | 7/6/2021 |
1.0.50 | 448 | 7/1/2021 |
1.0.49 | 434 | 7/1/2021 |
1.0.48 | 455 | 6/28/2021 |
1.0.47 | 1,080 | 5/5/2021 |
1.0.46 | 399 | 5/5/2021 |
1.0.45 | 418 | 5/4/2021 |
1.0.44 | 375 | 5/4/2021 |
1.0.43 | 473 | 4/26/2021 |
1.0.42 | 619 | 4/23/2021 |
1.0.41 | 432 | 4/23/2021 |
1.0.40 | 427 | 4/23/2021 |
1.0.39 | 407 | 4/23/2021 |
1.0.38 | 412 | 4/23/2021 |
1.0.37 | 450 | 4/23/2021 |
1.0.36 | 430 | 4/23/2021 |
1.0.33 | 417 | 4/21/2021 |
1.0.32 | 419 | 4/21/2021 |
1.0.31 | 412 | 4/21/2021 |
1.0.30 | 432 | 4/19/2021 |
1.0.29 | 433 | 4/19/2021 |
1.0.28 | 421 | 4/16/2021 |
1.0.27 | 440 | 4/16/2021 |
1.0.25 | 383 | 4/15/2021 |
1.0.24 | 445 | 4/14/2021 |
1.0.23 | 416 | 4/14/2021 |
1.0.22 | 396 | 4/14/2021 |
1.0.21 | 392 | 4/14/2021 |
1.0.20 | 401 | 4/13/2021 |
1.0.17 | 378 | 4/12/2021 |
1.0.16 | 400 | 4/12/2021 |
1.0.15 | 442 | 4/10/2021 |
1.0.14 | 401 | 4/10/2021 |
1.0.13 | 408 | 4/9/2021 |
1.0.12 | 412 | 4/9/2021 |
1.0.5 | 435 | 4/8/2021 |
1.0.4 | 427 | 4/8/2021 |
1.0.3 | 449 | 4/8/2021 |
0.0.1 | 443 | 4/9/2021 |
0.0.0.1 | 401 | 4/8/2021 |