Skip to main content
Jump to: navigation, search

BaSyx / Scenarios / Cloud Edge Deployment

< BaSyx ‎ | Scenarios
Revision as of 07:15, 7 September 2020 by Maximilian.conradi.iese.fraunhofer.de (Talk | contribs) (Created page with "This example shows the setup and usage of a distributed deployment. It contains two servers as shown in the illustration. The following components are used: * BaSyx_/_Doc...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This example shows the setup and usage of a distributed deployment. It contains two servers as shown in the illustration.

The following components are used:



CloudEdgeDeploymentScenario.png


Server one is hosted directly on a smart device and provides values measured directly on the device (e.g. a current temperature). It is called "EdgeServer" in the scenario.

The second server is a cloud server, which hosts the Asset Administration Shell and another submodel containing static property values of the device (e.g. a maximum temperature). It is called "CloudServer".


The EdgeServer and the CloudServer are tomcat servers, which are started in the methodes startupEdgeServer() and startupCloudServer() called by the constructor of the CloudEdgeDeploymentScenario class.

After the startup of both servers the constructor generates a new ConnectedAssetAdministrationShellManager using the InMemory Component. This Manager then is used to push the AAS and its documentation SM to the cloud server.


// Create an AASRegistryProxy to be used by the manager
 
registry = new AASRegistryProxy(registryPath);
 
 
// Create a ConnectedAASManager with the registry created above
 
aasManager = new ConnectedAssetAdministrationShellManager(registry);
 
 
// Push the AAS to the cloud server
// The manager automatically registers it in the registry
 
aasManager.createAAS(ComponentBuilder.getAAS(), aasIdentifier, "http://localhost:8081/cloud");
 
 
// Get the docuSubmodel from the ComponentBuilder
 
SubModel docuSubmodel = ComponentBuilder.getDocuSM();
 
 
// Push the docuSubmodel to the cloud
// The manager automatically registers it in the registry
 
aasManager.createSubModel(aasIdentifier, docuSubmodel);


As a last step the constructor registers the EdgeSubmodel directly in the descriptor of the AAS. This EdgeSubmodel is automatically provided by the EdgeServer and does not need to be pushed there.


// Add the already existing edgeSM to the descriptor of the aas
 
registry.register(aasIdentifier, ComponentBuilder.getEdgeSubmodelDescriptor());


An example of how to execute and use the scenario can be found in TestCloudEdgeDeploymentScenario. This class demonstrates the access of the AAS in the methode testAAS(), of the DocumentationSubmodel in testDocuSM() and the EdgeSubmodel in testEdgeSM().

Back to the top