The heart out-of Azure Electronic Twins is the twin graph representing the environment. This new twin graph is made from private digital twins linked thru relationships. This post focuses primarily on dealing with relationships and the chart because a good whole; to work with individual electronic twins, see Would digital twins.
Once you’ve a functional Blue Digital Twins eg and also have set-up verification code on your client application, you possibly can make, modify, and you may erase digital twins and their relationship in a blue Digital Twins particularly.
To work alongside Azure Digital Twins in this post, you first need to prepare an azure Digital Twins such as for instance. You also need the mandatory permissions for using it. For folks who have an azure Electronic Twins such arranged, you can use it alternatively.
Otherwise, stick to the information in Set-up a case and you may authentication. The newest information incorporate advice so you can verify that you have done each step successfully.
After you install their such as for instance, make a note of the second beliefs. You want these types of viewpoints to hook up to this new eg later on:
- The instance’s server name. There are the brand new machine title regarding the Blue portal.
- The latest Blue subscription you accustomed produce the eg. Both their title otherwise their ID will work. Discover the new registration on your own instance’s Evaluation webpage in the fresh new Azure portal.
This article features simple tips to over different administration procedures utilising the .Online (C#) SDK. You can even pastime these types of exact same administration phone calls utilising the most other code SDKs explained in Blue Electronic Twins APIs and you can SDKs.
Blue Digital Twins Explorer is an artwork unit to own examining the data on your Blue Digital Twins graph. You can use new explorer to view, query, and you may edit your own habits, twins, and you may matchmaking.
To see towards Blue Digital Twins Explorer unit, come across Azure Electronic Twins Explorer. For intricate procedures on precisely how to play with their possess, pick Use Blue Electronic Twins Explorer.
The types of relationship that can be created from you to definitely (source) twin to another (target) dual try defined as part of the origin twin’s DTDL model. You can create an example of jpeoplemeet a love utilizing the CreateOrReplaceRelationshipAsync() SDK telephone call with twins and you can dating details one to proceed with the DTDL meaning.
- The main cause twin ID ( srcId in the code attempt lower than): The ID of one’s dual where the relationships originates.
- The mark twin ID ( targetId about code sample below): New ID of one’s twin where in fact the relationships arrives.
- A romance term ( relName from the password attempt below): The brand new common brand of relationship, something such as includes.
- A relationship ID ( relId regarding password decide to try lower than): The label because of it relationships, something like Relationship1.
The relationship ID must be book during the considering supply dual. It will not need to be all over the world book. Particularly, on dual Foo, each particular dating ID have to be unique. However, another twin Pub have an outbound matchmaking that matches the new same ID regarding an excellent Foo matchmaking.
The next code attempt portrays how to make a relationship inside the their Azure Digital Twins such as. It uses the newest SDK label (highlighted) to the a personalized strategy which could are available in the new perspective out-of a much bigger program.
Should you want to manage numerous matchmaking, you might recite calls on the exact same strategy, passage various other matchmaking sizes on the conflict.
Would numerous matchmaking anywhere between twins
- Outbound dating: Relationships belonging to that it twin that time outward for connecting they to other twins. The GetRelationshipsAsync() method is used to score outgoing relationship out-of a twin.