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

Difference between revisions of "BaSyx / Documentation / Components / AAS Server"

(Creates AAS Server Component Description)
 
m
Line 2: Line 2:
 
The AAS server component provides an empty AAS server that can be used to host several AAS and Submodels.
 
The AAS server component provides an empty AAS server that can be used to host several AAS and Submodels.
 
For its API usage see [[BaSyx_/_Documentation_/_API_/_AssetAdministrationShell | Aggregator API]].
 
For its API usage see [[BaSyx_/_Documentation_/_API_/_AssetAdministrationShell | Aggregator API]].
In the following, a small code snippet shows its when it is already deployed. It assumes that somewhere a registry is already running. For this registry, the [[BaSyx_/_Documentation_/_Components_/_Registry | Registry Component]] can be used.
+
In the following, a small code snippet shows its usage when it is already deployed. It assumes that somewhere a registry is already running. For this registry, the [[BaSyx_/_Documentation_/_Components_/_Registry | Registry Component]] can be used.
  
 
<syntaxhighlight lang="java" style="margin-left: 4em">
 
<syntaxhighlight lang="java" style="margin-left: 4em">

Revision as of 11:00, 24 April 2020

AAS Server Component

The AAS server component provides an empty AAS server that can be used to host several AAS and Submodels. For its API usage see Aggregator API. In the following, a small code snippet shows its usage when it is already deployed. It assumes that somewhere a registry is already running. For this registry, the Registry Component can be used.

		AssetAdministrationShell shell = new AssetAdministrationShell();
		IIdentifier identifier = new ModelUrn("aasId");
		shell.setIdentification(identifier);
		shell.setIdShort("aasIdShort");
 
                IAASRegistryService aasRegistry = new AASRegistryProxy(URL); // URL has to be filled in by the user to point to the AAS registry
		ConnectedAssetAdministrationShellManager manager = new ConnectedAssetAdministrationShellManager(aasRegistry);
                manager.createAAS(shell, identifier, COMPONENT_URL); // Component URL has to filled in by the user to point to the component
 
                // The registered AAS can then be retrieved using a manager configured in the same way
		IAssetAdministrationShell remote = manager.retrieveAAS(identifier);

Back to the top