Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

BaSyx Product AAS

This scenario explains the basic handling of Asset Administration Shells (AAS). The asset administration shell is the central handling point for an asset in an Industrie 4.0 context. This scenario explains how a new Asset Administration Shell is registered on the fly on a directory server, and how it is retrieved and accessed by a user.

The BaSys setup for this functional example is the following:

Product AAS schema.png


This functional example consists of the following steps:


1. Application 1, e.g. ERP system creates a simple product AAS
// Create product AAS
// - Product ID (urn:<legalEntity>:<subUnit>:<subModel>:<version>:<revision>:<elementID>#<elementInstance>)
ModelUrn productID = new ModelUrn("de.FHG", "products.es.iese", "aas", "1.0", "3", "product1", null);
// - Create map with complex type
AssetAdministrationShell_ aas = new AssetAdministrationShell_();
aas.put("idShort", "ProductIDShort");


2. Application 1 loads the product AAS on server
// - AAS URL on server
String aasURLOnServer = "/aas/submodels/aasRepository/"+productID.getEncodedURN();
// - Create AAS structure on server
connSubModel.createElement(aasURLOnServer, aas);


3. Application 1 registers the product AAS with the AAS registry (see <<<>>>)
// Register AAS in directory (push AAS descriptor to server)
// - Create an AAS descriptor
AASDescriptor productAASDescriptor = new AASDescriptor(productID.getURN(), Identification.URI, aasSrvURL+aasURLOnServer);
// - Push AAS descriptor to server
client.post(wsURL+"/api/v1/registry", JSONTools.Instance.serialize(productAASDescriptor).toString());


4. Another application 2 looks up product AAS descriptor from server
// Lookup AAS
// - Lookup AAS from AAS directory, get AAS descriptor
String jsonData = client.get(wsURL+"/api/v1/registry/"+productID.getEncodedURN());
// - Read AAS end point from AAS descriptor
AASDescriptor aasDescriptor = new AASDescriptor((Map<String, Object>) JSONTools.Instance.deserialize(new JSONObject(jsonData)));


5. Application 2 accesses product AAS, and reads the "idShort" property
// Connect to AAS end point
VABElementProxy connSM = connManager.connectToVABElementByURL(aasDescriptor.getFirstEndpoint());
Map<String, Object> productAAS = (Map<String, Object>) connSM.readElementValue("");
// - Read product AAS from server
System.out.println("ReadBack:"+productAAS.get("idShort"));


BaSyx project links: Project BaSyx main wiki page | What is BaSyx? | BaSyx Developer Documentation

Back to the top