Elastacloud.DigiTwin.SDK 0.0.0.1

There is a newer version of this package available.
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
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Elastacloud.DigiTwin.SDK" Version="0.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Elastacloud.DigiTwin.SDK --version 0.0.0.1
#r "nuget: Elastacloud.DigiTwin.SDK, 0.0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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:

  1. Source Input Files to Target ADT - allows you to ask "what is deployed that is different to my local DTML?"
  2. Source Input Files to Target Input Files - allows you to ask "what is different two sets of DTDL files held locally?"
  3. Source ADT to Target ADT - allows you to ask "what is deployed differently between these ADT instances?"
  4. 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 if dtmi:elastacloud:code;4 exists and running with tolerance of 2 will decommission dtmi:elastacloud:code;1 and dtmi: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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 90 4/26/2024
3.1.7 296 2/5/2024
3.1.6 69 2/1/2024
3.1.5 66 1/31/2024
3.1.4 150 6/12/2023
3.1.2 8,067 11/22/2022
3.1.1 367 10/5/2022
3.0.12 2,647 7/28/2022
3.0.11 537 7/20/2022
3.0.10 958 6/10/2022
3.0.9 545 6/9/2022
3.0.8 912 4/28/2022
3.0.7 660 4/27/2022
3.0.6 492 4/26/2022
3.0.5 496 4/21/2022
3.0.4 496 4/14/2022
3.0.3 604 4/14/2022
3.0.2 487 4/14/2022
2.0.15 960 3/25/2022
2.0.14 549 3/21/2022
2.0.13 756 2/24/2022
2.0.12 670 2/14/2022
2.0.11 595 2/3/2022
2.0.1 668 1/5/2022
1.0.61 501 11/16/2021
1.0.60 465 11/9/2021
1.0.59 420 11/4/2021
1.0.58 393 10/29/2021
1.0.57 387 10/27/2021
1.0.56 820 9/27/2021
1.0.55 409 9/7/2021
1.0.54 585 7/29/2021
1.0.53 403 7/29/2021
1.0.52 442 7/28/2021
1.0.51 469 7/6/2021
1.0.50 417 7/1/2021
1.0.49 405 7/1/2021
1.0.48 425 6/28/2021
1.0.47 1,050 5/5/2021
1.0.46 369 5/5/2021
1.0.45 387 5/4/2021
1.0.44 343 5/4/2021
1.0.43 443 4/26/2021
1.0.42 589 4/23/2021
1.0.41 399 4/23/2021
1.0.40 395 4/23/2021
1.0.39 376 4/23/2021
1.0.38 381 4/23/2021
1.0.37 416 4/23/2021
1.0.36 398 4/23/2021
1.0.33 388 4/21/2021
1.0.32 387 4/21/2021
1.0.31 379 4/21/2021
1.0.30 401 4/19/2021
1.0.29 401 4/19/2021
1.0.28 389 4/16/2021
1.0.27 408 4/16/2021
1.0.25 351 4/15/2021
1.0.24 406 4/14/2021
1.0.23 384 4/14/2021
1.0.22 363 4/14/2021
1.0.21 360 4/14/2021
1.0.20 367 4/13/2021
1.0.17 344 4/12/2021
1.0.16 366 4/12/2021
1.0.15 409 4/10/2021
1.0.14 370 4/10/2021
1.0.13 377 4/9/2021
1.0.12 380 4/9/2021
1.0.5 403 4/8/2021
1.0.4 387 4/8/2021
1.0.3 416 4/8/2021
0.0.1 410 4/9/2021
0.0.0.1 369 4/8/2021