Skip to main content
Jump to: navigation, search

Difference between revisions of "BaSyx / Examples"

m
Line 17: Line 17:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' || style="width:45em" | ''Description'' || tyle="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' || style="width:45em" | ''Description'' || tyle="width:20em" | ''Source''
 
|-  
 
|-  
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Create AAS || [[BaSyx.Examples.Snippets.AASCreation.Java | (Java)]] || Illustrates how to create an Asset Administration Shell by instantiating a new AAS object. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/CreateAAS.java Java]
+
| Create AAS || Illustrates how to create an Asset Administration Shell by instantiating a new AAS object. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/CreateAAS.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Add Submodel to AAS || || Illustrates how to add a Submodel to an AAS object. If the AAS, the Submodel should be added to, is a ConnectedAAS (the actual AAS data is held on a server) this will upload the Submodel to the server, but not register it. You have to register it manually (see Register Submodel Snippet). Alternatively you can use the use the AASManager to add it (see Manager Snippets below), which will automatically register it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/AddSubmodelToAAS.java Java]
+
| Add Submodel to AAS || Illustrates how to add a Submodel to an AAS object. If the AAS, the Submodel should be added to, is a ConnectedAAS (the actual AAS data is held on a server) this will upload the Submodel to the server, but not register it. You have to register it manually (see Register Submodel Snippet). Alternatively you can use the use the AASManager to add it (see Manager Snippets below), which will automatically register it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/AddSubmodelToAAS.java Java]
 
|-  
 
|-  
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Retrieve Submodel from AAS || || Illustrates how to retrieve a Submodel from an AAS object. If the Submodel to be retrieved is located on a server it is often easier to use the AASManager (see Manager Snippets below) to retrieve it, as you can get the Submodel directly without getting the AAS first. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/RetrieveSubmodelFromAAS.java Java]
+
| Retrieve Submodel from AAS || Illustrates how to retrieve a Submodel from an AAS object. If the Submodel to be retrieved is located on a server it is often easier to use the AASManager (see Manager Snippets below) to retrieve it, as you can get the Submodel directly without getting the AAS first. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/RetrieveSubmodelFromAAS.java Java]
 
|-  
 
|-  
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Delete Submodel from AAS || || Illustrates how to delete a Submodel from an AAS object. If the AAS the Submodel should be deleted from is a ConnectedAAS (the actual AAS data is held on a server) this will delete the Submodel from the server, but not deregister it. You have to deregister it manually (see Deregister Submodel Snippet). Alternatively you can use the use the AASManager to delete it (see Manager Snippets below), which will automatically deregister it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/DeleteSubmodelFromAAS.java Java]
+
| Delete Submodel from AAS || Illustrates how to delete a Submodel from an AAS object. If the AAS the Submodel should be deleted from is a ConnectedAAS (the actual AAS data is held on a server) this will delete the Submodel from the server, but not deregister it. You have to deregister it manually (see Deregister Submodel Snippet). Alternatively you can use the use the AASManager to delete it (see Manager Snippets below), which will automatically deregister it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/aas/DeleteSubmodelFromAAS.java Java]
 
|}
 
|}
  
Line 43: Line 43:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' || style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' || style="width:45em" | ''Description'' || style="width:20em" | ''Source''
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Push AAS to server || || Illustrates how to upload an AAS to a server || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/PushAASToServer.java Java]
+
| Push AAS to server || Illustrates how to upload an AAS to a server || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/PushAASToServer.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Retrieve AAS || [[BaSyx.Examples.Snippets.AASConnection.Java | (Java)]] || Illustrates how to retrieve an AAS from a server using its ID. The retrieved AAS object will be a ConnectedAAS. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/RetrieveAAS.java Java]
+
| Retrieve AAS || Illustrates how to retrieve an AAS from a server using its ID. The retrieved AAS object will be a ConnectedAAS. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/RetrieveAAS.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Delete AAS || || Illustrates how to delete an Asset Administration Shell from a server. This will also automatically deregister the AAS. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/DeleteAAS.java Java]
+
| Delete AAS || Illustrates how to delete an Asset Administration Shell from a server. This will also automatically deregister the AAS. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/DeleteAAS.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Add Submodel to AAS || || Illustrates how to add a Submodel to an AAS on a server. This will upload the given Submodel to the server and register it to the AAS with the given ID. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/AddSubmodelToAAS.java Java]
+
| Add Submodel to AAS || Illustrates how to add a Submodel to an AAS on a server. This will upload the given Submodel to the server and register it to the AAS with the given ID. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/AddSubmodelToAAS.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Retrieve Submodel from AAS || || Illustrates how to retrieve Submodels from a server using its ID and the ID of the AAS it belongs to. The retrieved Submodel object will be a ConnectedSubmodel. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/RetrieveSubmodelFromAAS.java Java]
+
| Retrieve Submodel from AAS || Illustrates how to retrieve Submodels from a server using its ID and the ID of the AAS it belongs to. The retrieved Submodel object will be a ConnectedSubmodel. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/RetrieveSubmodelFromAAS.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Delete Submodel from AAS || || Illustrates how to delete a Submodel from an AAS on a server. This will delete the Submodel with the given ID from the AAS with the given ID. It will also automatically deregister the Submodel. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/DeleteSubmodelFromAAS.java Java]
+
| Delete Submodel from AAS || Illustrates how to delete a Submodel from an AAS on a server. This will delete the Submodel with the given ID from the AAS with the given ID. It will also automatically deregister the Submodel. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/manager/DeleteSubmodelFromAAS.java Java]
 
|}
 
|}
  
Line 77: Line 77:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Create Submodel || || Illustrates how to create a Submodel by instantiating a new Submodel object. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/CreateSubmodel.java Java]
+
| Create Submodel || Illustrates how to create a Submodel by instantiating a new Submodel object. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/CreateSubmodel.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Add Submodel element || || Illustrates how to add a Submodel element to a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/AddSubmodelElement.java Java]
+
| Add Submodel element || Illustrates how to add a Submodel element to a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/AddSubmodelElement.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Retrieve Submodel element|| || Illustrates how to retrieve a Submodel element from a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/RetrieveSubmodelElement.java Java]
+
| Retrieve Submodel element || Illustrates how to retrieve a Submodel element from a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/RetrieveSubmodelElement.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Delete Submodel element || || Illustrates how to delete a Submodel element from a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/DeleteSubmodelElement.java Java]
+
| Delete Submodel element || Illustrates how to delete a Submodel element from a Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/DeleteSubmodelElement.java Java]
 
|-
 
|-
| ​ || ​ || ​ || ​  
+
| ​ || ​ || ​  
 
|-
 
|-
| Invoke Submodel operation || || Illustrates the invokation of an Operation from Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/ExecuteOperation.java Java]
+
| Invoke Submodel operation || Illustrates the invokation of an Operation from Submodel object || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/submodel/ExecuteOperation.java Java]
 
|}
 
|}
  
Line 105: Line 105:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
 
|-
 
|-
| Register AAS ||  || Register AAS descriptors in registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/RegisterAAS.java Java]
+
| Register AAS || Register AAS descriptors in registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/RegisterAAS.java Java]
 
|-
 
|-
| Lookup AAS ||  || Retrieve AAS descriptors from registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/LookupAAS.java Java]
+
| Lookup AAS || Retrieve AAS descriptors from registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/LookupAAS.java Java]
 
|-
 
|-
| Deregister AAS ||  || Removes AAS descriptors from registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/DeregisterAAS.java Java]
+
| Deregister AAS || Removes AAS descriptors from registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/DeregisterAAS.java Java]
 
|-
 
|-
| Register Submodel ||  || Register a Submodel to an existing AAS descriptor || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/RegisterSubmodel.java Java]
+
| Register Submodel || Register a Submodel to an existing AAS descriptor || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/RegisterSubmodel.java Java]
 
|-
 
|-
| Lookup Submodel ||  || Retrieve a Submodel from a registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/LookupSubmodel.java Java]
+
| Lookup Submodel || Retrieve a Submodel from a registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/LookupSubmodel.java Java]
 
|-
 
|-
| Deregister Submodel ||  || Removes a Submodel from a registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/DeregisterSubmodel.java Java]
+
| Deregister Submodel || Removes a Submodel from a registry || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/main/java/org/eclipse/basyx/examples/snippets/registry/DeregisterSubmodel.java Java]
 
|}
 
|}
  
Line 128: Line 128:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
 
|-
 
|-
| CRUD operations || || Illustrate creation of VAB object and use of create/update/retrieve/delete operations to manipulate it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/CRUDOperations.java Java]
+
| CRUD operations || Illustrate creation of VAB object and use of create/update/retrieve/delete operations to manipulate it. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/CRUDOperations.java Java]
 
|-
 
|-
| Manual HTTP calls || || Illustrate manual HTTP operations to access VAB objects via HTTP REST interface || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/ManualHTTPCalls.java Java]
+
| Manual HTTP calls || Illustrate manual HTTP operations to access VAB objects via HTTP REST interface || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/ManualHTTPCalls.java Java]
 
|-
 
|-
| Dynamic property (Lambda) || || Illustrate dynamic properties (Lambda expression) in VAB objects. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/DynamicPropertyLambda.java Java]
+
| Dynamic property (Lambda) || Illustrate dynamic properties (Lambda expression) in VAB objects. || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/DynamicPropertyLambda.java Java]
 
|-
 
|-
| Dynamic property (Class) || || Illustrate the dynamic properties (Class) in VAB objects. ||  
+
| Dynamic property (Class) || Illustrate the dynamic properties (Class) in VAB objects. ||  
 
[https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/DynamicPropertyClass.java Java]
 
[https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/vab/DynamicPropertyClass.java Java]
 
|}
 
|}
Line 151: Line 151:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
 
|-
 
|-
| Dynamic property (Lambda) ||  || Illustrate dynamic Submodel properties (Lambda expression) || N/A
+
| Dynamic property (Lambda) || Illustrate dynamic Submodel properties (Lambda expression) || N/A
 
|-
 
|-
| Dynamic property (Class) ||  || Illustrate the dynamic Submodel properties (Class) || N/A
+
| Dynamic property (Class) || Illustrate the dynamic Submodel properties (Class) || N/A
 
|}
 
|}
  
Line 165: Line 165:
  
 
{|
 
{|
| style="width:20em" | ''Snippet'' || style="width:20em" | ''Additional Documentation'' ||style="width:45em" | ''Description'' || style="width:20em" | ''Source''
+
| style="width:20em" | ''Snippet'' || style="width:45em" | ''Description'' || style="width:20em" | ''Source''
 
|-
 
|-
| Construct URNs ||  || Create URNs for AAS and globally idenfied Submodels || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/urn/ConstructURNs.java Java]
+
| Construct URNs ||  Create URNs for AAS and globally idenfied Submodels || [https://git.eclipse.org/r/plugins/gitiles/basyx/basyx/+/master/examples/basys.examples/src/test/java/org/eclipse/basyx/examples/snippets/urn/ConstructURNs.java Java]
 
|}
 
|}
  

Revision as of 09:30, 7 January 2021

Examples

Code snippets

Code snippets are simple, isolated use-cases that illustrate the use of Eclipse BaSyx. They provide focused recipes that document the intended use of the BaSyx SDK and our reference implementations of Industrie 4.0 middleware components. To keep functional examples simple, code snippets only address selected aspects of Industrie 4.0 implementations. Selected snippets provide a page with documentation. For all snippets, links to executable source code files in the git repository are provided. The snippets itself only contain the code necessary to fulfil their function. Examples on how to use the snippets can be found in the tests for the snippets.

Please keep in mind that not all features are available with all language versions of Eclipse BaSyx. Snippets therefore may only be available for selected languages.

The code for the snippets is available via the Eclipse BaSyx GIT repository:

  • For Java, the code is located in the basyx.example project in package org.eclipse.basyx.examples.snippets


Asset Administration Shell (AAS)

The Asset Administration Shell snippets illustrate different aspects of the usage of the Asset Administration Shell.

Snippet Description Source
Create AAS Illustrates how to create an Asset Administration Shell by instantiating a new AAS object. Java
Add Submodel to AAS Illustrates how to add a Submodel to an AAS object. If the AAS, the Submodel should be added to, is a ConnectedAAS (the actual AAS data is held on a server) this will upload the Submodel to the server, but not register it. You have to register it manually (see Register Submodel Snippet). Alternatively you can use the use the AASManager to add it (see Manager Snippets below), which will automatically register it. Java
Retrieve Submodel from AAS Illustrates how to retrieve a Submodel from an AAS object. If the Submodel to be retrieved is located on a server it is often easier to use the AASManager (see Manager Snippets below) to retrieve it, as you can get the Submodel directly without getting the AAS first. Java
Delete Submodel from AAS Illustrates how to delete a Submodel from an AAS object. If the AAS the Submodel should be deleted from is a ConnectedAAS (the actual AAS data is held on a server) this will delete the Submodel from the server, but not deregister it. You have to deregister it manually (see Deregister Submodel Snippet). Alternatively you can use the use the AASManager to delete it (see Manager Snippets below), which will automatically deregister it. Java


AAS Manager

These code snippets illustrate how to use the ConnectedAssetAdministrationShellManager for interacting with BaSyx elements hosted on a server.

Snippet Description Source
Push AAS to server Illustrates how to upload an AAS to a server Java
Retrieve AAS Illustrates how to retrieve an AAS from a server using its ID. The retrieved AAS object will be a ConnectedAAS. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. Java
Delete AAS Illustrates how to delete an Asset Administration Shell from a server. This will also automatically deregister the AAS. Java
Add Submodel to AAS Illustrates how to add a Submodel to an AAS on a server. This will upload the given Submodel to the server and register it to the AAS with the given ID. Java
Retrieve Submodel from AAS Illustrates how to retrieve Submodels from a server using its ID and the ID of the AAS it belongs to. The retrieved Submodel object will be a ConnectedSubmodel. This "connected" object holds no data locally. Instead it contacts the server for every data transaction. Java
Delete Submodel from AAS Illustrates how to delete a Submodel from an AAS on a server. This will delete the Submodel with the given ID from the AAS with the given ID. It will also automatically deregister the Submodel. Java


AAS Submodels

Asset Administration Shell Submodels may be distributed through the network. While an AAS resides on the IT and remains accessible in case of device failures, Submodels may be distributed. Submodels containing static data or information about devices that needs to remain available in case of device failure may be hosted on the IT as well; Submodels containing live data may be hosted on devices, and possibly on products. The following code snippets illustrate the creation, transfer, hosting, and use of AAS Submodels.

Snippet Description Source
Create Submodel Illustrates how to create a Submodel by instantiating a new Submodel object. Java
Add Submodel element Illustrates how to add a Submodel element to a Submodel object Java
Retrieve Submodel element Illustrates how to retrieve a Submodel element from a Submodel object Java
Delete Submodel element Illustrates how to delete a Submodel element from a Submodel object Java
Invoke Submodel operation Illustrates the invokation of an Operation from Submodel object Java


Registry

The Asset Administration Shell registry enables registration of AAS and Submodels, as well as retrieving previously registered AAS and Submodels by their IDs.

Snippet Description Source
Register AAS Register AAS descriptors in registry Java
Lookup AAS Retrieve AAS descriptors from registry Java
Deregister AAS Removes AAS descriptors from registry Java
Register Submodel Register a Submodel to an existing AAS descriptor Java
Lookup Submodel Retrieve a Submodel from a registry Java
Deregister Submodel Removes a Submodel from a registry Java



Virtual Automation Bus (VAB)

The Virtual Automation Bus provides end-to-end connection capabilities. The VAB uses gateways to connect network technologies into one virtual, and fully connected network. The network consists of objects, e.g. Asset Administration Shells and Submodels that are accessible through unqiue IDs. The following code snippets illustrate VAB operations and the use of the Virtual Automation Bus.

Snippet Description Source
CRUD operations Illustrate creation of VAB object and use of create/update/retrieve/delete operations to manipulate it. Java
Manual HTTP calls Illustrate manual HTTP operations to access VAB objects via HTTP REST interface Java
Dynamic property (Lambda) Illustrate dynamic properties (Lambda expression) in VAB objects. Java
Dynamic property (Class) Illustrate the dynamic properties (Class) in VAB objects.

Java

AAS Submodel providers

Eclipse BaSyx provides pre-created AAS Submodel providers. These servlets connect existing data sources, such as textual configuration files and SQL data bases into Industrie 4.0 environments as AAS Submodels. BaSyx Submodel providers are configured with a configuration API and do not require programming knowledge to integrate data sources into Industrie 4.0 environments as AAS Submodels.


AAS Submodels (Dynamic)

Asset Administration Shell Submodels may contain dynamic properties and operations. Dynamic properties are properties whose values are generated dynamically at runtime. This may happen for example periodically, or whenever a specific information is requested. Dynamic operations are operations that may be updated at runtime. The following code snippets illustrate dynamic Submodel properties and operations.

Snippet Description Source
Dynamic property (Lambda) Illustrate dynamic Submodel properties (Lambda expression) N/A
Dynamic property (Class) Illustrate the dynamic Submodel properties (Class) N/A


URN

Eclipse BaSyx advocates the use of URNs as unique identifiers for AAS. Code snippets illustrate the creation and use of URNs.

Snippet Description Source
Construct URNs Create URNs for AAS and globally idenfied Submodels Java

Deployment with Docker

The deployment of the different SDKs and components with docker is explained in its own page.

Monitoring Applications (AAS Dashboards)

The integration with third-party applications & tools enable the possibility to monitor Asset Administration Shell and visualize its data through Dashboards. The integration and its use is explained in here [page].

Back to the top