- Aggregator renamed to repository
- Submodel Repository interface and reference implementation added
- Submodel Http Server does now support multiple submodels in a submodel repository
- Complex Asset Administration Shell Scenario as example project added
- Packages updated
diff --git a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiAssetAdministrationShellHttpServer.cs b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiAssetAdministrationShellHttpServer.cs
index b9f36be..2ddacfd 100644
--- a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiAssetAdministrationShellHttpServer.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiAssetAdministrationShellHttpServer.cs
@@ -21,11 +21,11 @@
: base(typeof(MultiStartup), serverSettings ?? ServerSettings.LoadSettings(), webHostBuilderArgs)
{ }
- public void SetServiceProvider(IAssetAdministrationShellAggregatorServiceProvider aggregatorServiceProvider)
+ public void SetServiceProvider(IAssetAdministrationShellRepositoryServiceProvider repositoryServiceProvider)
{
WebHostBuilder.ConfigureServices(services =>
{
- services.AddSingleton<IAssetAdministrationShellAggregatorServiceProvider>(aggregatorServiceProvider);
+ services.AddSingleton<IAssetAdministrationShellRepositoryServiceProvider>(repositoryServiceProvider);
});
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiStartup.cs b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiStartup.cs
index 9ce773c..cd00f57 100644
--- a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiStartup.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/MultiStartup.cs
@@ -73,7 +73,7 @@
services.AddTransient(ctx =>
{
IAssetAdministrationShellServiceProvider aasServiceProvider = ctx
- .GetRequiredService<IAssetAdministrationShellAggregatorServiceProvider>()
+ .GetRequiredService<IAssetAdministrationShellRepositoryServiceProvider>()
.GetAssetAdministrationShellServiceProvider(aasId);
return new AssetAdministrationShellServices(aasServiceProvider);
@@ -84,7 +84,7 @@
services.AddTransient(ctx =>
{
IAssetAdministrationShellServiceProvider aasServiceProvider = ctx
- .GetRequiredService<IAssetAdministrationShellAggregatorServiceProvider>()
+ .GetRequiredService<IAssetAdministrationShellRepositoryServiceProvider>()
.GetAssetAdministrationShellServiceProvider(aasId);
var submodelServiceProvider = aasServiceProvider.SubmodelRegistry.GetSubmodelServiceProvider(submodelId);
@@ -103,8 +103,8 @@
c.SwaggerDoc("v1", new OpenApiInfo
{
Version = "v1",
- Title = "BaSyx Asset Administration Shell Aggregator HTTP REST-API",
- Description = "The full description of the generic BaSyx Asset Administration Shell Aggregator HTTP REST-API",
+ Title = "BaSyx Asset Administration Shell Repository HTTP REST-API",
+ Description = "The full description of the generic BaSyx Asset Administration Shell Repository HTTP REST-API",
Contact = new OpenApiContact { Name = "Constantin Ziesche", Email = "constantin.ziesche@bosch.com", Url = new Uri("https://www.bosch.com/de/") },
License = new OpenApiLicense { Name = "EPL-2.0", Url = new Uri("https://www.eclipse.org/legal/epl-2.0/") }
});
@@ -220,7 +220,7 @@
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c =>
{
- c.SwaggerEndpoint("/swagger/v1/swagger.json", "BaSyx Asset Administration Shell Aggregator HTTP REST-API");
+ c.SwaggerEndpoint("/swagger/v1/swagger.json", "BaSyx Asset Administration Shell Repository HTTP REST-API");
});
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml
index 33d5a94..d51a5c7 100644
--- a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml
@@ -12,7 +12,7 @@
@{
ViewData["Title"] = "MultiIndex";
- IAssetAdministrationShellAggregatorServiceProvider sp = Model.ServiceProvider;
+ IAssetAdministrationShellRepositoryServiceProvider sp = Model.ServiceProvider;
string eClassLink = "https://www.eclasscontent.com/index.php?action=cc2prdet&language=en&version=10.1&id=&pridatt=";
diff --git a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml.cs b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml.cs
index 9b00960..8d34ada 100644
--- a/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.AAS.Server.Http/Pages/MultiIndex.cshtml.cs
@@ -16,10 +16,10 @@
{
public class MultiIndexModel : PageModel
{
- public IAssetAdministrationShellAggregatorServiceProvider ServiceProvider { get; }
+ public IAssetAdministrationShellRepositoryServiceProvider ServiceProvider { get; }
public ServerSettings Settings { get; }
- public MultiIndexModel(IAssetAdministrationShellAggregatorServiceProvider provider, ServerSettings serverSettings)
+ public MultiIndexModel(IAssetAdministrationShellRepositoryServiceProvider provider, ServerSettings serverSettings)
{
ServiceProvider = provider;
Settings = serverSettings;
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiStartup.cs
similarity index 73%
copy from sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs
copy to sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiStartup.cs
index 4e5390d..ca39798 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiStartup.cs
@@ -8,6 +8,8 @@
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
+using BaSyx.API.Components;
+using BaSyx.API.Http.Controllers;
using BaSyx.Components.Common;
using BaSyx.Utils.DependencyInjection;
using BaSyx.Utils.Settings;
@@ -30,7 +32,7 @@
namespace BaSyx.Submodel.Server.Http
{
- public class Startup
+ public class MultiStartup
{
private static Logger logger = NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
private const string ControllerAssemblyName = "BaSyx.API.Http.Controllers";
@@ -39,8 +41,9 @@
public static ServerSettings ServerSettings { get; set; }
public IServerApplicationLifetime ServerApplicationLifetime { get; }
+ private string submodelId = string.Empty;
- public Startup(IConfiguration configuration, ServerSettings serverSettings, IServerApplicationLifetime serverApplicationLifetime)
+ public MultiStartup(IConfiguration configuration, ServerSettings serverSettings, IServerApplicationLifetime serverApplicationLifetime)
{
Configuration = configuration;
ServerSettings = serverSettings;
@@ -58,13 +61,22 @@
.AddApplicationPart(controllerAssembly)
.AddControllersAsServices()
.AddNewtonsoftJson(options => options.GetDefaultMvcJsonOptions(services));
+
services.AddRazorPages(options =>
{
string pageName = ServerSettings.ServerConfig?.DefaultRoute ?? "/Index";
options.Conventions.AddPageRoute(pageName, "");
});
- services.AddDirectoryBrowser();
+ //Check whether Submodel Service Provider exists and bind it to the Submodel-Services-Controller
+ services.AddTransient(ctx =>
+ {
+ ISubmodelServiceProvider submodelServiceProvider = ctx
+ .GetRequiredService<ISubmodelRepositoryServiceProvider>()
+ .GetSubmodelServiceProvider(submodelId);
+
+ return new SubmodelServices(submodelServiceProvider);
+ });
// Register the Swagger generator, defining one or more Swagger documents
services.AddSwaggerGen(c =>
@@ -72,8 +84,8 @@
c.SwaggerDoc("v1", new OpenApiInfo
{
Version = "v1",
- Title = "BaSyx Submodel HTTP REST-API",
- Description = "The full description of the generic BaSyx Submodel HTTP REST-API",
+ Title = "BaSyx Submodel Repository HTTP REST-API",
+ Description = "The full description of the generic BaSyx Submodel Repository HTTP REST-API",
Contact = new OpenApiContact { Name = "Constantin Ziesche", Email = "constantin.ziesche@bosch.com", Url = new Uri("https://www.bosch.com/de/") },
License = new OpenApiLicense { Name = "EPL-2.0", Url = new Uri("https://www.eclipse.org/legal/epl-2.0/") }
});
@@ -118,6 +130,36 @@
});
}
+ app.Use((context, next) =>
+ {
+ string[] pathElements = context.Request.Path.ToUriComponent()?.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
+
+
+ if (pathElements == null || pathElements.Length == 0)
+ {
+ string defaultRoute = ServerSettings.ServerConfig.DefaultRoute ?? "/MultiIndex";
+ context.Request.Path = new PathString(defaultRoute);
+ return next();
+ }
+ if (pathElements.Length >= 2)
+ {
+ submodelId = pathElements[1];
+ if (pathElements.Length == 2)
+ {
+ context.Request.Path = new PathString("/submodels/" + submodelId);
+ }
+ else if (pathElements.Length >= 3 && pathElements[2] == "submodel")
+ {
+ string[] restOfPathArray = new string[pathElements.Length - 3];
+ Array.Copy(pathElements, 3, restOfPathArray, 0, pathElements.Length - 3);
+ string restOfPath = string.Join("/", restOfPathArray);
+
+ context.Request.Path = new PathString("/submodel/" + restOfPath);
+ }
+ }
+ return next();
+ });
+
app.UseRouting();
app.UseCors(
@@ -146,7 +188,7 @@
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c =>
{
- c.SwaggerEndpoint("/swagger/v1/swagger.json", "BaSyx Submodel HTTP REST-API");
+ c.SwaggerEndpoint("/swagger/v1/swagger.json", "BaSyx Submodel Repository HTTP REST-API");
});
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiSubmodelHttpServer.cs b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiSubmodelHttpServer.cs
new file mode 100644
index 0000000..eabca56
--- /dev/null
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/MultiSubmodelHttpServer.cs
@@ -0,0 +1,32 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.API.Components;
+using BaSyx.Components.Common;
+using BaSyx.Utils.Settings.Types;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace BaSyx.Submodel.Server.Http
+{
+ public class MultiSubmodelHttpServer : ServerApplication
+ {
+ public MultiSubmodelHttpServer(ServerSettings serverSettings = null, string[] webHostBuilderArgs = null)
+ : base(typeof(MultiStartup), serverSettings ?? ServerSettings.LoadSettings(), webHostBuilderArgs)
+ { }
+
+ public void SetServiceProvider(ISubmodelRepositoryServiceProvider submodelRepositoryServiceProvider)
+ {
+ WebHostBuilder.ConfigureServices(services =>
+ {
+ services.AddSingleton<ISubmodelRepositoryServiceProvider>(submodelRepositoryServiceProvider);
+ });
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml
new file mode 100644
index 0000000..bb29631
--- /dev/null
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml
@@ -0,0 +1,570 @@
+@page
+@model BaSyx.Submodel.Server.Http.Pages.MultiIndexModel
+@using BaSyx.API.Components;
+@using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+@using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes;
+@using BaSyx.Models.Core.AssetAdministrationShell.Identification;
+@using BaSyx.Models.Core.AssetAdministrationShell.References;
+@using BaSyx.Models.Core.Common;
+@using BaSyx.Models.Extensions;
+@using BaSyx.Models.Core.AssetAdministrationShell.Semantics;
+@using Microsoft.AspNetCore.Html;
+
+@{
+ ViewData["Title"] = "MultiIndex";
+ ISubmodelRepositoryServiceProvider sp = Model.ServiceProvider;
+
+ string eClassLink = "https://www.eclasscontent.com/index.php?action=cc2prdet&language=en&version=10.1&id=&pridatt=";
+
+ Func<Identifier, IHtmlContent> ShowIdentification = @<text>@{
+ var identifier = item;
+ @if (identifier != null)
+ {
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>Identifier (@identifier.IdType.ToString())</b></div>
+ <div class="col-sm-10">@identifier.Id</div>
+ </div>
+ </div>
+ }
+}</text>;
+
+Func<string, IHtmlContent> ShowIdShort = @<text>@{
+var idShort = item;
+@if (!string.IsNullOrEmpty(idShort))
+{
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>IdShort</b></div>
+ <div class="col-sm-10">@idShort</div>
+ </div>
+ </div>
+}
+}</text>;
+
+Func<IReference, IHtmlContent> ShowSemanticId = @<text>@{
+var reference = item;
+@if (reference?.First?.Value != null)
+{
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>SemanticId</b></div>
+ @if (reference.First.IdType == KeyType.IRDI)
+ {
+ {
+ string link = eClassLink + Uri.EscapeDataString(reference.First.Value);
+ <div class="col-sm-10"><a target="_blank" href="@link">@reference.First.Value (eCl@ss)</a></div>
+ }
+ }
+ else
+ {
+ <div class="col-sm-10">@reference.First.Value</div>
+ }
+ </div>
+ </div>
+}
+}</text>;
+
+
+Func<LangStringSet, IHtmlContent> ShowDescription = @<text>@{
+var langStringCollection = item;
+@if (langStringCollection?.Count > 0)
+{
+ string description = string.Empty;
+ for (int i = 0; i < langStringCollection.Count; i++)
+ {
+ description = langStringCollection[i].Language + ":" + langStringCollection[i].Text + (i != langStringCollection.Count - 1 ? ";" : "");
+ }
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>Description</b></div>
+ <div class="col-sm-10">@description</div>
+ </div>
+ </div>
+}
+}</text>;
+
+Func<IValue, IHtmlContent> ShowValue = @<text>@{
+var value = item;
+if (value.ValueType == null)
+{
+ var serialized = Json.Serialize(value.Value).ToString();
+ @serialized
+}
+else
+{
+ @value.Value?.ToString()
+}
+}</text>;
+
+Func<string, IHtmlContent> ShowSubmodelElementHeader = @<text>@{
+var idShort = item;
+if (string.IsNullOrEmpty(idShort))
+{
+ return;
+}
+else
+{
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" href="#@idShort">@idShort</a>
+ </h4>
+ </div>
+}
+}</text>;
+
+Func<string, IProperty, IHtmlContent> ShowPropertyFooter = (submodelIdShort, property) => new Func<object, Microsoft.AspNetCore.Mvc.Razor.HelperResult>(@<text>@{
+
+if (string.IsNullOrEmpty(submodelIdShort) || property == null)
+{
+ return;
+}
+else
+{
+ <div class="panel-footer">
+ <div class="row">
+ <div class="col-sm-8">
+
+ <div class="input-group">
+ <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
+ <input id="Input_@submodelIdShort@property.IdShort" type="text" class="form-control" placeholder="Value" value="@ShowValue(property)" />
+ </div>
+
+ </div>
+ <div class="col-sm-1"><button onclick="@("GetPropertyValue('" + submodelIdShort + "', '" + property.IdShort + "')")" id="@property.IdShort;Retrieve" type="button" class="btn btn-primary">Retrieve</button></div>
+ <div class="col-sm-1"><button onclick="@("SetPropertyValue('" + submodelIdShort + "', '" + property.IdShort + "', '" + property.ValueType?.ToString() + "', $('#Input_" + submodelIdShort + property.IdShort + "').val() )")" id="@property.IdShort;Update" type="button" class="btn btn-success">Update</button></div>
+
+ </div>
+ </div>
+}
+}</text>)(null);
+
+Func<ISubmodelElement, IHtmlContent> ShowModelElementSpecificAttributes = @<text>@{
+var submodelElement = item;
+
+if (!Enum.TryParse<KeyElements>(submodelElement.ModelType.Name, out KeyElements keyElements))
+{
+ return;
+}
+
+switch (keyElements)
+{
+ case KeyElements.GlobalReference:
+ break;
+ case KeyElements.FragmentReference:
+ break;
+ case KeyElements.AccessPermissionRule:
+ break;
+ case KeyElements.AnnotatedRelationshipElement:
+ break;
+ case KeyElements.BasicEvent:
+ break;
+ case KeyElements.Blob:
+ break;
+ case KeyElements.Capability:
+ break;
+ case KeyElements.ConceptDictionary:
+ break;
+ case KeyElements.DataElement:
+ break;
+ case KeyElements.File:
+ {
+ IFile file = submodelElement?.ToModelElement<IFile>();
+ if (file == null)
+ {
+ return;
+ }
+
+ string path = GetPath(file);
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>MimeType</b></div>
+ <div class="col-sm-10">@file.MimeType</div>
+ </div>
+ </div>
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>Path</b></div>
+ <div class="col-sm-10">@path</div>
+ </div>
+ </div>
+ string contentRoot = System.IO.Path.Combine(AppContext.BaseDirectory, Model.Settings.ServerConfig.Hosting.ContentPath);
+ var contentFileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(contentRoot);
+ @if (contentFileProvider.GetFileInfo(path).Exists)
+ {
+ <embed src="@path#navpanes=0&scrollbar=0" width="100%" />
+ }
+ }
+ return;
+ case KeyElements.Entity:
+ break;
+ case KeyElements.Event:
+ {
+ IEvent eventable = submodelElement?.ToModelElement<IEvent>();
+ if (eventable == null)
+ {
+ return;
+ }
+
+ @foreach (var element in eventable.DataElements)
+ {
+ <div class="row">
+ @{ string valueTypeName = element.ToModelElement<IProperty>()?.ValueType?.ToString() ?? "ANY"; }
+ <div class="col-sm-10"><b>@element.IdShort (@valueTypeName)</b></div>
+ </div>
+ }
+ }
+ return;
+ case KeyElements.MultiLanguageProperty:
+ break;
+ case KeyElements.Operation:
+ break;
+ case KeyElements.Property:
+ IProperty property = submodelElement?.ToModelElement<IProperty>();
+ if (property == null)
+ {
+ return;
+ }
+
+ string dataTypeName = property.ValueType?.ToString()?.ToUpper();
+ if (string.IsNullOrEmpty(dataTypeName))
+ {
+ dataTypeName = property?.ModelType?.Name;
+ }
+
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>ValueType</b></div>
+ <div class="col-sm-10">@dataTypeName</div>
+ </div>
+ </div>
+ return;
+ case KeyElements.Range:
+ break;
+ case KeyElements.ReferenceElement:
+ break;
+ case KeyElements.RelationshipElement:
+ break;
+ case KeyElements.SubmodelElement:
+ break;
+ case KeyElements.SubmodelElementCollection:
+ break;
+ case KeyElements.View:
+ break;
+ case KeyElements.AssetAdministrationShell:
+ break;
+ case KeyElements.ConceptDescription:
+ break;
+ default:
+ break;
+}
+
+}</text>;
+
+Func<ISubmodelElement, IHtmlContent> ShowValueType = @<text>@{
+var submodelElement = item;
+if (submodelElement.GetType().GetInterfaces().Where(i => i.Name == "ISubmodelElement") == null)
+{
+ return;
+}
+else
+{
+ var property = (IProperty)submodelElement;
+ var dataTypeName = property.ValueType?.DataObjectType?.Name?.ToUpper();
+ if (string.IsNullOrEmpty(dataTypeName))
+ {
+ dataTypeName = property.ModelType?.Name;
+ }
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-sm-2"><b>ValueType</b></div>
+ <div class="col-sm-10">@dataTypeName</div>
+ </div>
+ </div>
+}
+}</text>;
+
+Func<IEnumerable<IEmbeddedDataSpecification>, IHtmlContent> ShowDataSpecifications = @<text>@{
+var embeddedDataSpecifications = item;
+if (embeddedDataSpecifications?.Count() > 0)
+{
+ @foreach (var dataSpecification in embeddedDataSpecifications)
+ {
+ <div class="list-group-item" style="background:#88b8d9; color:white">
+ <div class="row">
+ <div class="col-sm-2"><b>Data-Specification</b></div>
+ <div class="col-sm-10">@dataSpecification.HasDataSpecification.First.Value</div>
+ </div>
+ </div>
+
+ @foreach (var property in dataSpecification.DataSpecificationContent.GetType().GetProperties())
+ {
+
+ @if (property.PropertyType.IsGenericType && (property.PropertyType.GetGenericTypeDefinition() == typeof(List<>)))
+ {
+ var values = property.GetValue(dataSpecification.DataSpecificationContent) as IEnumerable<object>;
+ if (values?.Count() > 0)
+ {
+ foreach (var element in values)
+ {
+ foreach (var subProperty in property.PropertyType.GenericTypeArguments[0].GetProperties())
+ {
+ var value = subProperty.GetValue(element)?.ToString();
+ if (value != null)
+ {
+ <div class="list-group-item" style="background:#88b8d9; color:white">
+ <div class="row">
+ <div class="col-sm-2"><b>@subProperty.Name</b></div>
+ <div class="col-sm-10">@value</div>
+ </div>
+ </div>
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ var value = property.GetValue(dataSpecification.DataSpecificationContent);
+ if (value != null)
+ {
+ if (value is IReference reference)
+ {
+ value = reference.First.Value;
+ }
+ else
+ {
+ value = value.ToString();
+ }
+
+ <div class="list-group-item" style="background:#88b8d9; color:white">
+ <div class="row">
+ <div class="col-sm-2"><b>@property.Name</b></div>
+ <div class="col-sm-10">@value</div>
+ </div>
+ </div>
+ }
+ }
+
+ }
+ }
+}
+}</text>;
+
+Func<List<object>, IHtmlContent> ShowSubmodelElement = null;
+
+ShowSubmodelElement = @<text>@{
+var submodelwithElement = item;
+if (submodelwithElement?.Count < 2)
+{
+ return;
+}
+else
+{
+ ISubmodel submodel = submodelwithElement[0] as ISubmodel;
+ ISubmodelElement submodelElement = submodelwithElement[1] as ISubmodelElement;
+
+ <div class="panel panel-warning">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" href="#@submodelElement.IdShort">@submodelElement.IdShort</a>
+ </h4>
+ </div>
+ <div id="@submodelElement.IdShort" class="panel-collapse collapse">
+ @ShowDataSpecifications(submodelElement.EmbeddedDataSpecifications)
+ @ShowDescription(submodelElement.Description)
+ @ShowSemanticId(submodelElement.SemanticId)
+ @ShowModelElementSpecificAttributes(submodelElement)
+
+ @if (submodelElement is IProperty property)
+ {
+ @ShowPropertyFooter(submodel.IdShort, property)
+ }
+ else if (submodelElement is IOperation operation)
+ {
+ if (operation.InputVariables?.Count > 0)
+ {
+ foreach (var argument in operation.InputVariables.ToElementContainer())
+ {
+ <div class="panel-body" style="background:#88b8d9">
+ <div class="row">
+ <div class="col-sm-2 argInName @submodel.IdShort @operation.IdShort"><b>@argument.IdShort</b></div>
+ <div class="col-sm-2 argInType @submodel.IdShort @operation.IdShort">@GetValueOrModelType(argument)</div>
+ <div class="col-sm-8">
+ <div class="input-group">
+ <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
+ <input id="msg" type="text" class="form-control argInValue @submodel.IdShort @operation.IdShort" name="msg" placeholder="Argument Value">
+ </div>
+ </div>
+ </div>
+ </div>
+ }
+ }
+ if (operation.OutputVariables?.Count > 0)
+ {
+ foreach (var argument in operation.OutputVariables.ToElementContainer())
+ {
+ <div class="panel-body" style="background:#d68dbc">
+ <div class="row">
+ <div class="col-sm-2 argOutName @submodel.IdShort @operation.IdShort"><b>@argument.IdShort</b></div>
+ <div class="col-sm-2 argOutType @submodel.IdShort @operation.IdShort">@GetValueOrModelType(argument)</div>
+ <div class="col-sm-8">
+ <div class="input-group">
+ <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
+ <input id="argOutValue_@submodel.IdShort@operation.IdShort@argument.IdShort" type="text" class="form-control argOutValue @submodel.IdShort @operation.IdShort" name="msg" placeholder="Return Value">
+ </div>
+ </div>
+ </div>
+ </div>
+ }
+ }
+ <div class="panel-footer"><button onclick="@("ExecuteOperation('" + submodel.IdShort + "', '" + operation.IdShort + "')")" type="button" class="btn btn-success">Execute</button></div>
+ }
+ else if (submodelElement is ISubmodelElementCollection collection)
+ {
+ if (collection.Value?.Count > 0)
+ {
+ @foreach (var value in collection.Value)
+ {
+ <div class="panel-body">
+ @ShowSubmodelElement(new List<object>() { submodel, value })
+ </div>
+ }
+ }
+ }
+ </div>
+ </div>
+}
+}</text>;
+}
+
+@functions
+{
+ public string GetPath(IFile file)
+ {
+ string content = file.Value;
+ if (string.IsNullOrEmpty(content))
+ return string.Empty;
+
+ content = content.Replace('\\', '/');
+ return content;
+ }
+
+ public string GetValueOrModelType(ISubmodelElement submodelElement)
+ {
+ if (submodelElement is IProperty property)
+ {
+ return property.ValueType?.ToString();
+ }
+ else
+ {
+ return submodelElement.ModelType.Name;
+ }
+ }
+}
+
+<!doctype html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="~/scripts/bootstrap.min.css">
+ <title>BaSys Multi Submodel UI</title>
+ <script src="~/scripts/jquery-3.3.1.min.js"></script>
+ <script src="~/scripts/popper.min.js"></script>
+ <script src="~/scripts/bootstrap.min.js"></script>
+
+ <style>
+ .bd-placeholder-img {
+ font-size: 1.125rem;
+ text-anchor: middle;
+ }
+
+ @@media (min-width: 768px) {
+ .bd-placeholder-img-lg {
+ font-size: 3.5rem;
+ }
+ }
+ </style>
+
+</head>
+<body>
+
+ <nav class="navbar navbar-inverse">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <img src="~/images/basyxlogo.png" width="160" height="64" />
+ </div>
+ <ul class="nav navbar-nav">
+ <li><a href="#" style="margin-top:15px">Main</a></li>
+ </ul>
+ <div class="navbar-right"><img src="~/images/Bosch.gif" width="103" height="30" style="margin-top:25px; margin-right:15px" /></div>
+ </div>
+ </nav>
+
+ <main role="main" class="container">
+
+ <div class="starter-template">
+ <h1>Multi Submodel UI</h1>
+ <p class="lead">Generic UI to display many Submodels</p>
+ </div>
+ </main>
+
+
+ @if (sp.Submodels?.Count() > 0)
+ {
+ foreach (var submodel in sp.Submodels)
+ {
+ <div class="container">
+ <div class="panel panel-default">
+ <div class="panel-heading" style="background:#7ca1ce">
+ <h4>
+ <a style="color:white" data-toggle="collapse" href="#@submodel.IdShort">@submodel.IdShort</a>
+ </h4>
+ </div>
+ <div id="@submodel.IdShort" class="panel-collapse collapse">
+ <div class="panel-body">
+ <div class="panel panel-default">
+ <div class="panel-heading" style="background:#7ca1ce"><h4 style="color:white">Submodel</h4></div>
+ @ShowIdShort(submodel.IdShort)
+ @ShowIdentification(submodel.Identification)
+ @ShowDescription(submodel.Description)
+ @ShowSemanticId(submodel.SemanticId)
+ <div class="panel-body">
+ <div class="panel-group">
+ @if (submodel.SubmodelElements?.Count > 0)
+ {
+ <div class="panel panel-default">
+ <div class="panel-heading" style="background:#005691"><h4 style="color:white">Submodel-Elements</h4></div>
+ <div class="panel-body">
+ <div class="panel-group">
+ @for (int i = 0; i < submodel.SubmodelElements.Count; i++)
+ {
+ var submodelElement = submodel.SubmodelElements[i];
+ if (submodelElement == null)
+ { continue; }
+
+ @ShowSubmodelElement(new List<object>() { submodel, submodelElement });
+
+ }
+ </div>
+ </div>
+ </div>
+ }
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ }
+ }
+
+
+</body>
+</html>
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml.cs b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml.cs
new file mode 100644
index 0000000..20c0bc5
--- /dev/null
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Pages/MultiIndex.cshtml.cs
@@ -0,0 +1,33 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.API.Components;
+using BaSyx.Utils.Settings.Types;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace BaSyx.Submodel.Server.Http.Pages
+{
+ public class MultiIndexModel : PageModel
+ {
+ public ISubmodelRepositoryServiceProvider ServiceProvider { get; }
+ public ServerSettings Settings { get; }
+
+ public MultiIndexModel(ISubmodelRepositoryServiceProvider provider, ServerSettings serverSettings)
+ {
+ ServiceProvider = provider;
+ Settings = serverSettings;
+ }
+
+ public void OnGet()
+ {
+
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SingleStartup.cs
similarity index 97%
rename from sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs
rename to sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SingleStartup.cs
index 4e5390d..64cbe5d 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/Startup.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SingleStartup.cs
@@ -30,7 +30,7 @@
namespace BaSyx.Submodel.Server.Http
{
- public class Startup
+ public class SingleStartup
{
private static Logger logger = NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
private const string ControllerAssemblyName = "BaSyx.API.Http.Controllers";
@@ -40,7 +40,7 @@
public IServerApplicationLifetime ServerApplicationLifetime { get; }
- public Startup(IConfiguration configuration, ServerSettings serverSettings, IServerApplicationLifetime serverApplicationLifetime)
+ public SingleStartup(IConfiguration configuration, ServerSettings serverSettings, IServerApplicationLifetime serverApplicationLifetime)
{
Configuration = configuration;
ServerSettings = serverSettings;
diff --git a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SubmodelHttpServer.cs b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SubmodelHttpServer.cs
index d9d225b..37e85a9 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SubmodelHttpServer.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.Submodel.Server.Http/SubmodelHttpServer.cs
@@ -18,7 +18,7 @@
public class SubmodelHttpServer : ServerApplication
{
public SubmodelHttpServer(ServerSettings serverSettings = null, string[] webHostBuilderArgs = null)
- : base(typeof(Startup), serverSettings ?? ServerSettings.LoadSettings(), webHostBuilderArgs)
+ : base(typeof(SingleStartup), serverSettings ?? ServerSettings.LoadSettings(), webHostBuilderArgs)
{ }
public void SetServiceProvider(ISubmodelServiceProvider submodelServiceProvider)
diff --git a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellAggregatorServices.cs b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryServices.cs
similarity index 81%
rename from sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellAggregatorServices.cs
rename to sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryServices.cs
index 286083b..fa0b9fc 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellAggregatorServices.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryServices.cs
@@ -19,27 +19,27 @@
namespace BaSyx.API.Http.Controllers
{
/// <summary>
- /// The Asset Administration Shell Aggregator Controller
+ /// The Asset Administration Shell Repository Controller
/// </summary>
- public class AssetAdministrationShellAggregatorServices : Controller, IAssetAdministrationShellAggregatorServiceProvider
+ public class AssetAdministrationShellRepositoryServices : Controller, IAssetAdministrationShellRepositoryServiceProvider
{
- private readonly IAssetAdministrationShellAggregatorServiceProvider aggregator;
+ private readonly IAssetAdministrationShellRepositoryServiceProvider repository;
- public IEnumerable<IAssetAdministrationShell> AssetAdministrationShells => aggregator.AssetAdministrationShells;
- public IAssetAdministrationShellAggregatorDescriptor ServiceDescriptor { get; }
+ public IEnumerable<IAssetAdministrationShell> AssetAdministrationShells => repository.AssetAdministrationShells;
+ public IAssetAdministrationShellRepositoryDescriptor ServiceDescriptor { get; }
- public AssetAdministrationShellAggregatorServices(IAssetAdministrationShellAggregatorServiceProvider assetAdministrationShellAggregatorServiceProvider)
+ public AssetAdministrationShellRepositoryServices(IAssetAdministrationShellRepositoryServiceProvider assetAdministrationShellRepositoryServiceProvider)
{
- aggregator = assetAdministrationShellAggregatorServiceProvider;
- ServiceDescriptor = assetAdministrationShellAggregatorServiceProvider.ServiceDescriptor;
+ repository = assetAdministrationShellRepositoryServiceProvider;
+ ServiceDescriptor = assetAdministrationShellRepositoryServiceProvider.ServiceDescriptor;
}
- #region REST-Interface AssetAdministrationShellAggregator
+ #region REST-Interface AssetAdministrationShellRepository
/// <summary>
- /// Retrieves all Asset Administration Shells from the aggregator service endpoint
+ /// Retrieves all Asset Administration Shells from the repository service endpoint
/// </summary>
/// <returns></returns>
/// <response code="200">Returns a list of found Asset Administration Shells</response>
@@ -54,7 +54,7 @@
return result.CreateActionResult(CrudOperation.Retrieve);
}
/// <summary>
- /// Retrieves a specific Asset Administration Shell from the aggregator service endpint
+ /// Retrieves a specific Asset Administration Shell from the repository service endpint
/// </summary>
/// <param name="aasId">The Asset Administration Shell's short id</param>
/// <returns></returns>
@@ -70,7 +70,7 @@
return result.CreateActionResult(CrudOperation.Retrieve);
}
/// <summary>
- /// Updates a specific Asset Administration Shell at the aggregator service endpint
+ /// Updates a specific Asset Administration Shell at the repository service endpint
/// </summary>
/// <param name="aasId">The Asset Administration Shell's unique id</param>
/// <param name="aas">The updated Asset Administration Shell</param>
@@ -86,7 +86,7 @@
return result.CreateActionResult(CrudOperation.Update);
}
/// <summary>
- /// Creates a new Asset Administration Shell at the aggregator service endpoint
+ /// Creates a new Asset Administration Shell at the repository service endpoint
/// </summary>
/// <param name="aas">The serialized Asset Administration Shell object</param>
/// <returns></returns>
@@ -101,7 +101,7 @@
return result.CreateActionResult(CrudOperation.Create);
}
/// <summary>
- /// Deletes a specific Asset Administration Shell at the aggregator service endpoint
+ /// Deletes a specific Asset Administration Shell at the repository service endpoint
/// </summary>
/// <param name="aasId">The Asset Administration Shell's unique id</param>
/// <returns></returns>
@@ -144,55 +144,55 @@
}
#endregion
- #region Interface Implementation AssetAdministrationShellAggregator
+ #region Interface Implementation AssetAdministrationShellRepository
public void RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider)
{
- aggregator.RegisterAssetAdministrationShellServiceProvider(id, assetAdministrationShellServiceProvider);
+ repository.RegisterAssetAdministrationShellServiceProvider(id, assetAdministrationShellServiceProvider);
}
public IAssetAdministrationShellServiceProvider GetAssetAdministrationShellServiceProvider(string id)
{
- return aggregator.GetAssetAdministrationShellServiceProvider(id);
+ return repository.GetAssetAdministrationShellServiceProvider(id);
}
public IEnumerable<IAssetAdministrationShellServiceProvider> GetAssetAdministrationShellServiceProviders()
{
- return aggregator.GetAssetAdministrationShellServiceProviders();
+ return repository.GetAssetAdministrationShellServiceProviders();
}
public void BindTo(IEnumerable<IAssetAdministrationShell> element)
{
- aggregator.BindTo(element);
+ repository.BindTo(element);
}
public IEnumerable<IAssetAdministrationShell> GetBinding()
{
- return aggregator.GetBinding();
+ return repository.GetBinding();
}
public IResult<IAssetAdministrationShell> CreateAssetAdministrationShell(IAssetAdministrationShell aas)
{
- return aggregator.CreateAssetAdministrationShell(aas);
+ return repository.CreateAssetAdministrationShell(aas);
}
public IResult<IAssetAdministrationShell> RetrieveAssetAdministrationShell(string aasId)
{
- return aggregator.RetrieveAssetAdministrationShell(aasId);
+ return repository.RetrieveAssetAdministrationShell(aasId);
}
public IResult<IElementContainer<IAssetAdministrationShell>> RetrieveAssetAdministrationShells()
{
- return aggregator.RetrieveAssetAdministrationShells();
+ return repository.RetrieveAssetAdministrationShells();
}
public IResult UpdateAssetAdministrationShell(string aasId, IAssetAdministrationShell aas)
{
- return aggregator.UpdateAssetAdministrationShell(aasId, aas);
+ return repository.UpdateAssetAdministrationShell(aasId, aas);
}
public IResult DeleteAssetAdministrationShell(string aasId)
{
- return aggregator.DeleteAssetAdministrationShell(aasId);
+ return repository.DeleteAssetAdministrationShell(aasId);
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryServices.cs b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryServices.cs
new file mode 100644
index 0000000..3b53ed6
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryServices.cs
@@ -0,0 +1,203 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Utils.ResultHandling;
+using BaSyx.API.Components;
+using BaSyx.Models.Connectivity.Descriptors;
+using BaSyx.Models.Core.Common;
+
+namespace BaSyx.API.Http.Controllers
+{
+ /// <summary>
+ /// The Submodel Repository Controller
+ /// </summary>
+ public class SubmodelRepositoryServices : Controller, ISubmodelRepositoryServiceProvider
+ {
+
+ private readonly ISubmodelRepositoryServiceProvider repository;
+
+ public IEnumerable<ISubmodel> Submodels => repository.Submodels;
+ public ISubmodelRepositoryDescriptor ServiceDescriptor { get; }
+
+
+ public SubmodelRepositoryServices(ISubmodelRepositoryServiceProvider submodelRepositoryServiceProvider)
+ {
+ repository = submodelRepositoryServiceProvider;
+ ServiceDescriptor = submodelRepositoryServiceProvider.ServiceDescriptor;
+ }
+
+ #region REST-Interface SubmodelRepository
+
+ /// <summary>
+ /// Retrieves all Submodels from the repository service endpoint
+ /// </summary>
+ /// <returns></returns>
+ /// <response code="200">Returns a list of found Submodels</response>
+ /// <response code="404">No Submodels found</response>
+ /// <response code="400">Bad Request</response>
+ /// <response code="502">Bad Gateway</response>
+ [HttpGet("submodels", Name = "RetrieveAllSubmodels")]
+ [ProducesResponseType(typeof(IResult<List<ISubmodel>>), 200)]
+ public IActionResult RetrieveAllSubmodels()
+ {
+ var result = RetrieveSubmodels();
+ return result.CreateActionResult(CrudOperation.Retrieve);
+ }
+ /// <summary>
+ /// Retrieves a specific Submodel from the repository service endpint
+ /// </summary>
+ /// <param name="submodelId">The Submodel's short id</param>
+ /// <returns></returns>
+ /// <response code="200">Returns the requested Submodel</response>
+ /// <response code="404">No Submodel found</response>
+ /// <response code="400">Bad Request</response>
+ /// <response code="502">Bad Gateway</response>
+ [HttpGet("submodels/{submodelId}", Name = "RetrieveSubmodelByIdShort")]
+ [ProducesResponseType(typeof(IResult<ISubmodel>), 200)]
+ public IActionResult RetrieveSubmodelByIdShort(string submodelId)
+ {
+ var result = RetrieveSubmodel(submodelId);
+ return result.CreateActionResult(CrudOperation.Retrieve);
+ }
+ /// <summary>
+ /// Updates a specific Submodel at the repository service endpint
+ /// </summary>
+ /// <param name="submodelId">The Submodel's unique id</param>
+ /// <param name="submodel">The updated Submodel</param>
+ /// <returns></returns>
+ /// <response code="200">Submodel updated successfully</response>
+ /// <response code="400">Bad Request</response>
+ /// <response code="502">Bad Gateway</response>
+ [HttpPut("submodels/{submodelId}", Name = "UpdateSubmodelByIdShort")]
+ [ProducesResponseType(typeof(IResult), 200)]
+ public IActionResult UpdateSubmodelByIdShort(string submodelId, [FromBody] ISubmodel submodel)
+ {
+ var result = UpdateSubmodel(submodelId, submodel);
+ return result.CreateActionResult(CrudOperation.Update);
+ }
+ /// <summary>
+ /// Creates a new Submodel at the repository service endpoint
+ /// </summary>
+ /// <param name="submodel">The serialized Submodel object</param>
+ /// <returns></returns>
+ /// <response code="201">Submodel created successfully</response>
+ /// <response code="400">Bad Request</response>
+ /// <response code="502">Bad Gateway</response>
+ [HttpPost("submodels", Name = "CreateNewSubmodel")]
+ [ProducesResponseType(typeof(IResult<ISubmodel>), 201)]
+ public IActionResult CreateNewSubmodel([FromBody] ISubmodel submodel)
+ {
+ var result = CreateSubmodel(submodel);
+ return result.CreateActionResult(CrudOperation.Create);
+ }
+ /// <summary>
+ /// Deletes a specific Submodel at the repository service endpoint
+ /// </summary>
+ /// <param name="submodelId">The Submodel's unique id</param>
+ /// <returns></returns>
+ /// <response code="200">Submodel deleted successfully</response>
+ /// <response code="400">Bad Request</response>
+ /// <response code="502">Bad Gateway</response>
+ [HttpDelete("submodels/{submodelId}", Name = "DeleteSubmodelByIdShort")]
+ [ProducesResponseType(typeof(IResult), 200)]
+ public IActionResult DeleteSubmodelByIdShort(string submodelId)
+ {
+ var result = DeleteSubmodel(submodelId);
+ return result.CreateActionResult(CrudOperation.Delete);
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private static IActionResult AggregateResultHandling(IResult result)
+ {
+ if (result != null)
+ {
+ var objResult = new ObjectResult(result);
+
+ if (result.Success)
+ {
+ if (result.Entity == null)
+ objResult.StatusCode = 404;
+ else
+ objResult.StatusCode = 200;
+ }
+ else if (Utils.ResultHandling.Utils.TryParseStatusCode(result, out int httpStatusCode))
+ objResult.StatusCode = httpStatusCode;
+ else
+ objResult.StatusCode = 502;
+
+ return objResult;
+ }
+ return new BadRequestResult();
+ }
+ #endregion
+
+ #region Interface Implementation SubmodelRepository
+ public void RegisterSubmodelServiceProvider(string id, ISubmodelServiceProvider submodelServiceProvider)
+ {
+ repository.RegisterSubmodelServiceProvider(id, submodelServiceProvider);
+ }
+
+ public ISubmodelServiceProvider GetSubmodelServiceProvider(string id)
+ {
+ return repository.GetSubmodelServiceProvider(id);
+ }
+
+ public IEnumerable<ISubmodelServiceProvider> GetSubmodelServiceProviders()
+ {
+ return repository.GetSubmodelServiceProviders();
+ }
+
+ public void BindTo(IEnumerable<ISubmodel> element)
+ {
+ repository.BindTo(element);
+ }
+
+ public IEnumerable<ISubmodel> GetBinding()
+ {
+ return repository.GetBinding();
+ }
+
+ public IResult<ISubmodel> CreateSubmodel(ISubmodel submodel)
+ {
+ return repository.CreateSubmodel(submodel);
+ }
+
+ public IResult<ISubmodel> RetrieveSubmodel(string submodelId)
+ {
+ return repository.RetrieveSubmodel(submodelId);
+ }
+
+ public IResult<IElementContainer<ISubmodel>> RetrieveSubmodels()
+ {
+ return repository.RetrieveSubmodels();
+ }
+
+ public IResult UpdateSubmodel(string submodelId, ISubmodel submodel)
+ {
+ return repository.UpdateSubmodel(submodelId, submodel);
+ }
+
+ public IResult DeleteSubmodel(string submodelId)
+ {
+ return repository.DeleteSubmodel(submodelId);
+ }
+
+
+
+
+ #endregion
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelServices.cs b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelServices.cs
index 83d69f4..6e02fb2 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelServices.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelServices.cs
@@ -199,12 +199,12 @@
/// <returns></returns>
/// <response code="200">Returns the requested Submodel Element</response>
/// <response code="404">Submodel/Submodel Element not found</response>
- [HttpGet("submodel/submodelElements/{submodelElementId}", Name = "GetSubmodelElementByIdShort")]
+ [HttpGet("submodel/submodelElements/{*submodelElementId}", Name = "GetSubmodelElementByIdShort")]
[ProducesResponseType(typeof(Property), 200)]
[ProducesResponseType(typeof(Result), 404)]
public IActionResult GetSubmodelElementByIdShort(string submodelElementId)
{
- var result = RetrieveSubmodelElement(submodelElementId);
+ var result = RetrieveSubmodelElement(submodelElementId);
return result.CreateActionResult(CrudOperation.Retrieve);
}
@@ -215,7 +215,7 @@
/// <returns></returns>
/// <response code="204">Submodel Element deleted successfully</response>
/// <response code="404">Submodel/Submodel Element not found</response>
- [HttpDelete("submodel/submodelElements/{submodelElementId}", Name = "DeleteSubmodelElementByIdShort")]
+ [HttpDelete("submodel/submodelElements/{*submodelElementId}", Name = "DeleteSubmodelElementByIdShort")]
[ProducesResponseType(typeof(IResult), 200)]
public IActionResult DeleteSubmodelElementByIdShort(string submodelElementId)
{
diff --git a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
index bb52cf9..6ee946d 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
+++ b/sdks/dotnet/basyx-core/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
@@ -4,14 +4,14 @@
<name>BaSyx.API.Http.Controllers</name>
</assembly>
<members>
- <member name="T:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices">
+ <member name="T:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices">
<summary>
- The Asset Administration Shell Aggregator Controller
+ The Asset Administration Shell Repository Controller
</summary>
</member>
- <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices.RetrieveAllAssetAdministrationShells">
+ <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices.RetrieveAllAssetAdministrationShells">
<summary>
- Retrieves all Asset Administration Shells from the aggregator service endpoint
+ Retrieves all Asset Administration Shells from the repository service endpoint
</summary>
<returns></returns>
<response code="200">Returns a list of found Asset Administration Shells</response>
@@ -19,9 +19,9 @@
<response code="400">Bad Request</response>
<response code="502">Bad Gateway</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices.RetrieveAssetAdministrationShellByIdShort(System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices.RetrieveAssetAdministrationShellByIdShort(System.String)">
<summary>
- Retrieves a specific Asset Administration Shell from the aggregator service endpint
+ Retrieves a specific Asset Administration Shell from the repository service endpint
</summary>
<param name="aasId">The Asset Administration Shell's short id</param>
<returns></returns>
@@ -30,9 +30,9 @@
<response code="400">Bad Request</response>
<response code="502">Bad Gateway</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices.UpdateAssetAdministrationShellByIdShort(System.String,BaSyx.Models.Core.AssetAdministrationShell.Generics.IAssetAdministrationShell)">
+ <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices.UpdateAssetAdministrationShellByIdShort(System.String,BaSyx.Models.Core.AssetAdministrationShell.Generics.IAssetAdministrationShell)">
<summary>
- Updates a specific Asset Administration Shell at the aggregator service endpint
+ Updates a specific Asset Administration Shell at the repository service endpint
</summary>
<param name="aasId">The Asset Administration Shell's unique id</param>
<param name="aas">The updated Asset Administration Shell</param>
@@ -41,9 +41,9 @@
<response code="400">Bad Request</response>
<response code="502">Bad Gateway</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices.CreateNewAssetAdministrationShell(BaSyx.Models.Core.AssetAdministrationShell.Generics.IAssetAdministrationShell)">
+ <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices.CreateNewAssetAdministrationShell(BaSyx.Models.Core.AssetAdministrationShell.Generics.IAssetAdministrationShell)">
<summary>
- Creates a new Asset Administration Shell at the aggregator service endpoint
+ Creates a new Asset Administration Shell at the repository service endpoint
</summary>
<param name="aas">The serialized Asset Administration Shell object</param>
<returns></returns>
@@ -51,9 +51,9 @@
<response code="400">Bad Request</response>
<response code="502">Bad Gateway</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellAggregatorServices.DeleteAssetAdministrationShellByIdShort(System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.AssetAdministrationShellRepositoryServices.DeleteAssetAdministrationShellByIdShort(System.String)">
<summary>
- Deletes a specific Asset Administration Shell at the aggregator service endpoint
+ Deletes a specific Asset Administration Shell at the repository service endpoint
</summary>
<param name="aasId">The Asset Administration Shell's unique id</param>
<returns></returns>
@@ -247,6 +247,63 @@
<response code="204">Event deleted successfully</response>
<response code="404">Submodel not found</response>
</member>
+ <member name="T:BaSyx.API.Http.Controllers.SubmodelRepositoryServices">
+ <summary>
+ The Submodel Repository Controller
+ </summary>
+ </member>
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryServices.RetrieveAllSubmodels">
+ <summary>
+ Retrieves all Submodels from the repository service endpoint
+ </summary>
+ <returns></returns>
+ <response code="200">Returns a list of found Submodels</response>
+ <response code="404">No Submodels found</response>
+ <response code="400">Bad Request</response>
+ <response code="502">Bad Gateway</response>
+ </member>
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryServices.RetrieveSubmodelByIdShort(System.String)">
+ <summary>
+ Retrieves a specific Submodel from the repository service endpint
+ </summary>
+ <param name="submodelId">The Submodel's short id</param>
+ <returns></returns>
+ <response code="200">Returns the requested Submodel</response>
+ <response code="404">No Submodel found</response>
+ <response code="400">Bad Request</response>
+ <response code="502">Bad Gateway</response>
+ </member>
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryServices.UpdateSubmodelByIdShort(System.String,BaSyx.Models.Core.AssetAdministrationShell.Generics.ISubmodel)">
+ <summary>
+ Updates a specific Submodel at the repository service endpint
+ </summary>
+ <param name="submodelId">The Submodel's unique id</param>
+ <param name="submodel">The updated Submodel</param>
+ <returns></returns>
+ <response code="200">Submodel updated successfully</response>
+ <response code="400">Bad Request</response>
+ <response code="502">Bad Gateway</response>
+ </member>
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryServices.CreateNewSubmodel(BaSyx.Models.Core.AssetAdministrationShell.Generics.ISubmodel)">
+ <summary>
+ Creates a new Submodel at the repository service endpoint
+ </summary>
+ <param name="submodel">The serialized Submodel object</param>
+ <returns></returns>
+ <response code="201">Submodel created successfully</response>
+ <response code="400">Bad Request</response>
+ <response code="502">Bad Gateway</response>
+ </member>
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryServices.DeleteSubmodelByIdShort(System.String)">
+ <summary>
+ Deletes a specific Submodel at the repository service endpoint
+ </summary>
+ <param name="submodelId">The Submodel's unique id</param>
+ <returns></returns>
+ <response code="200">Submodel deleted successfully</response>
+ <response code="400">Bad Request</response>
+ <response code="502">Bad Gateway</response>
+ </member>
<member name="T:BaSyx.API.Http.Controllers.SubmodelServices">
<summary>
All Asset Administration Shell Services provided by the component
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellAggregatorServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs
similarity index 91%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellAggregatorServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs
index 4df0ab8..2152cae 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellAggregatorServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs
@@ -19,19 +19,19 @@
namespace BaSyx.API.Components
{
- public class AssetAdministrationShellAggregatorServiceProvider : IAssetAdministrationShellAggregatorServiceProvider
+ public class AssetAdministrationShellRepositoryServiceProvider : IAssetAdministrationShellRepositoryServiceProvider
{
public IEnumerable<IAssetAdministrationShell> AssetAdministrationShells => GetBinding();
private Dictionary<string, IAssetAdministrationShellServiceProvider> AssetAdministrationShellServiceProviders { get; }
- private IAssetAdministrationShellAggregatorDescriptor _serviceDescriptor;
- public IAssetAdministrationShellAggregatorDescriptor ServiceDescriptor
+ private IAssetAdministrationShellRepositoryDescriptor _serviceDescriptor;
+ public IAssetAdministrationShellRepositoryDescriptor ServiceDescriptor
{
get
{
if (_serviceDescriptor == null)
- _serviceDescriptor = new AssetAdministrationShellAggregatorDescriptor(AssetAdministrationShells, null);
+ _serviceDescriptor = new AssetAdministrationShellRepositoryDescriptor(AssetAdministrationShells, null);
return _serviceDescriptor;
}
@@ -40,12 +40,12 @@
_serviceDescriptor = value;
}
}
- public AssetAdministrationShellAggregatorServiceProvider(IAssetAdministrationShellAggregatorDescriptor descriptor) : this()
+ public AssetAdministrationShellRepositoryServiceProvider(IAssetAdministrationShellRepositoryDescriptor descriptor) : this()
{
ServiceDescriptor = descriptor;
}
- public AssetAdministrationShellAggregatorServiceProvider()
+ public AssetAdministrationShellRepositoryServiceProvider()
{
AssetAdministrationShellServiceProviders = new Dictionary<string, IAssetAdministrationShellServiceProvider>();
}
@@ -56,7 +56,7 @@
{
RegisterAssetAdministrationShellServiceProvider(assetAdministrationShell.IdShort, assetAdministrationShell.CreateServiceProvider(true));
}
- ServiceDescriptor = ServiceDescriptor ?? new AssetAdministrationShellAggregatorDescriptor(assetAdministrationShells, null);
+ ServiceDescriptor = ServiceDescriptor ?? new AssetAdministrationShellRepositoryDescriptor(assetAdministrationShells, null);
}
public IEnumerable<IAssetAdministrationShell> GetBinding()
{
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/DefaultEndpointRegistration.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/DefaultEndpointRegistration.cs
index 0356b11..b10416d 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/DefaultEndpointRegistration.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/DefaultEndpointRegistration.cs
@@ -21,7 +21,23 @@
public static class DefaultEndpointRegistration
{
private static readonly ILogger logger = LogManager.GetCurrentClassLogger();
- public static void UseAutoEndpointRegistration(this IAssetAdministrationShellAggregatorServiceProvider serviceProvider, ServerConfiguration serverConfiguration)
+ public static void UseAutoEndpointRegistration(this IAssetAdministrationShellRepositoryServiceProvider serviceProvider, ServerConfiguration serverConfiguration)
+ {
+ string multiUrl = serverConfiguration.Hosting.Urls.Find(u => u.Contains("+"));
+ if (!string.IsNullOrEmpty(multiUrl))
+ {
+ Uri uri = new Uri(multiUrl.Replace("+", "localhost"));
+ List<IEndpoint> endpoints = GetNetworkInterfaceBasedEndpoints(uri.Scheme, uri.Port);
+ serviceProvider.UseDefaultEndpointRegistration(endpoints);
+ }
+ else
+ {
+ List<IEndpoint> endpoints = serverConfiguration.Hosting.Urls.ConvertAll(EndpointConverter);
+ serviceProvider.UseDefaultEndpointRegistration(endpoints);
+ }
+ }
+
+ public static void UseAutoEndpointRegistration(this ISubmodelRepositoryServiceProvider serviceProvider, ServerConfiguration serverConfiguration)
{
string multiUrl = serverConfiguration.Hosting.Urls.Find(u => u.Contains("+"));
if (!string.IsNullOrEmpty(multiUrl))
@@ -100,24 +116,24 @@
return aasEndpoints;
}
- public static void UseDefaultEndpointRegistration(this IAssetAdministrationShellAggregatorServiceProvider serviceProvider, IEnumerable<IEndpoint> endpoints)
+ public static void UseDefaultEndpointRegistration(this IAssetAdministrationShellRepositoryServiceProvider serviceProvider, IEnumerable<IEndpoint> endpoints)
{
- List<IEndpoint> aggregatorEndpoints = new List<IEndpoint>();
+ List<IEndpoint> repositoryEndpoints = new List<IEndpoint>();
foreach (var endpoint in endpoints)
{
string epAddress = endpoint.Address;
if (!epAddress.EndsWith("/shells"))
epAddress = epAddress + (epAddress.EndsWith("/") ? "" : "/") + "shells";
- aggregatorEndpoints.Add(EndpointFactory.CreateEndpoint(endpoint.Type, epAddress, endpoint.Security));
+ repositoryEndpoints.Add(EndpointFactory.CreateEndpoint(endpoint.Type, epAddress, endpoint.Security));
}
- serviceProvider.ServiceDescriptor.AddEndpoints(aggregatorEndpoints);
- var aasAggregatorDescriptor = serviceProvider.ServiceDescriptor;
- foreach (var aasDescriptor in aasAggregatorDescriptor.AssetAdministrationShellDescriptors)
+ serviceProvider.ServiceDescriptor.AddEndpoints(repositoryEndpoints);
+ var aasRepositoryDescriptor = serviceProvider.ServiceDescriptor;
+ foreach (var aasDescriptor in aasRepositoryDescriptor.AssetAdministrationShellDescriptors)
{
List<IEndpoint> aasEndpoints = new List<IEndpoint>();
- foreach (var endpoint in aggregatorEndpoints)
+ foreach (var endpoint in repositoryEndpoints)
{
var ep = EndpointFactory.CreateEndpoint(endpoint.Type, GetAssetAdministrationShellEndpoint(endpoint, aasDescriptor.IdShort), endpoint.Security);
aasEndpoints.Add(ep);
@@ -137,6 +153,32 @@
}
}
+ public static void UseDefaultEndpointRegistration(this ISubmodelRepositoryServiceProvider serviceProvider, IEnumerable<IEndpoint> endpoints)
+ {
+ List<IEndpoint> repositoryEndpoints = new List<IEndpoint>();
+ foreach (var endpoint in endpoints)
+ {
+ string epAddress = endpoint.Address;
+ if (!epAddress.EndsWith("/submodels"))
+ epAddress = epAddress + (epAddress.EndsWith("/") ? "" : "/") + "submodels";
+
+ repositoryEndpoints.Add(EndpointFactory.CreateEndpoint(endpoint.Type, epAddress, endpoint.Security));
+ }
+
+ serviceProvider.ServiceDescriptor.AddEndpoints(repositoryEndpoints);
+ var submodelRepositoryDescriptor = serviceProvider.ServiceDescriptor;
+ foreach (var submodelDescriptor in submodelRepositoryDescriptor.SubmodelDescriptors)
+ {
+ List<IEndpoint> submodelEndpoints = new List<IEndpoint>();
+ foreach (var endpoint in repositoryEndpoints)
+ {
+ var ep = EndpointFactory.CreateEndpoint(endpoint.Type, GetSubmodelInRepositoryEndpoint(endpoint, submodelDescriptor.IdShort), endpoint.Security);
+ submodelEndpoints.Add(ep);
+ }
+ submodelDescriptor.AddEndpoints(submodelEndpoints);
+ }
+ }
+
public static void UseDefaultEndpointRegistration(this IAssetAdministrationShellServiceProvider serviceProvider, IEnumerable<IEndpoint> endpoints)
{
List<IEndpoint> aasEndpoints = new List<IEndpoint>();
@@ -178,6 +220,15 @@
serviceProvider.ServiceDescriptor.AddEndpoints(submodelEndpoints);
}
+ public static string GetSubmodelInRepositoryEndpoint(IEndpoint endpoint, string submodelId)
+ {
+ string epAddress = endpoint.Address;
+ if (!epAddress.EndsWith("/submodels"))
+ epAddress = epAddress + (epAddress.EndsWith("/") ? "" : "/") + "submodels";
+
+ return epAddress + "/" + submodelId + "/submodel";
+ }
+
public static string GetSubmodelEndpoint(IEndpoint endpoint, string submodelId)
{
string epAddress = endpoint.Address;
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregator.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepository.cs
similarity index 94%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregator.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepository.cs
index 001e7fb..279b6ac 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregator.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepository.cs
@@ -14,7 +14,7 @@
namespace BaSyx.API.Components
{
- public interface IAssetAdministrationShellAggregator
+ public interface IAssetAdministrationShellRepository
{
IResult<IAssetAdministrationShell> CreateAssetAdministrationShell(IAssetAdministrationShell aas);
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregatorServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs
similarity index 88%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregatorServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs
index 6e89fdb..b522197 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellAggregatorServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs
@@ -14,7 +14,7 @@
namespace BaSyx.API.Components
{
- public interface IAssetAdministrationShellAggregatorServiceProvider : IServiceProvider<IEnumerable<IAssetAdministrationShell>, IAssetAdministrationShellAggregatorDescriptor>, IAssetAdministrationShellAggregator
+ public interface IAssetAdministrationShellRepositoryServiceProvider : IServiceProvider<IEnumerable<IAssetAdministrationShell>, IAssetAdministrationShellRepositoryDescriptor>, IAssetAdministrationShellRepository
{
IEnumerable<IAssetAdministrationShell> AssetAdministrationShells { get; }
void RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider);
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepository.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepository.cs
new file mode 100644
index 0000000..bdbb778
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepository.cs
@@ -0,0 +1,29 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Models.Core.Common;
+using BaSyx.Utils.ResultHandling;
+
+namespace BaSyx.API.Components
+{
+ public interface ISubmodelRepository
+ {
+ IResult<ISubmodel> CreateSubmodel(ISubmodel submodel);
+
+ IResult<ISubmodel> RetrieveSubmodel(string submodelId);
+
+ IResult<IElementContainer<ISubmodel>> RetrieveSubmodels();
+
+ IResult UpdateSubmodel(string submodelId, ISubmodel submodel);
+
+ IResult DeleteSubmodel(string submodelId);
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs
new file mode 100644
index 0000000..665793e
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs
@@ -0,0 +1,24 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.Models.Connectivity.Descriptors;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using System.Collections.Generic;
+
+namespace BaSyx.API.Components
+{
+ public interface ISubmodelRepositoryServiceProvider : IServiceProvider<IEnumerable<ISubmodel>, ISubmodelRepositoryDescriptor>, ISubmodelRepository
+ {
+ IEnumerable<ISubmodel> Submodels { get; }
+ void RegisterSubmodelServiceProvider(string id, ISubmodelServiceProvider submodelServiceProvider);
+ ISubmodelServiceProvider GetSubmodelServiceProvider(string id);
+ IEnumerable<ISubmodelServiceProvider> GetSubmodelServiceProviders();
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs
new file mode 100644
index 0000000..646e838
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs
@@ -0,0 +1,144 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.API.AssetAdministrationShell.Extensions;
+using BaSyx.Models.Connectivity.Descriptors;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Models.Core.Common;
+using BaSyx.Utils.ResultHandling;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BaSyx.API.Components
+{
+ public class SubmodelRepositoryServiceProvider : ISubmodelRepositoryServiceProvider
+ {
+ public IEnumerable<ISubmodel> Submodels => GetBinding();
+
+ private Dictionary<string, ISubmodelServiceProvider> SubmodelServiceProviders { get; }
+
+ private ISubmodelRepositoryDescriptor _serviceDescriptor;
+ public ISubmodelRepositoryDescriptor ServiceDescriptor
+ {
+ get
+ {
+ if (_serviceDescriptor == null)
+ _serviceDescriptor = new SubmodelRepositoryDescriptor(Submodels, null);
+
+ return _serviceDescriptor;
+ }
+ private set
+ {
+ _serviceDescriptor = value;
+ }
+ }
+ public SubmodelRepositoryServiceProvider(ISubmodelRepositoryDescriptor descriptor) : this()
+ {
+ ServiceDescriptor = descriptor;
+ }
+
+ public SubmodelRepositoryServiceProvider()
+ {
+ SubmodelServiceProviders = new Dictionary<string, ISubmodelServiceProvider>();
+ }
+
+ public void BindTo(IEnumerable<ISubmodel> submodels)
+ {
+ foreach (var submodel in submodels)
+ {
+ RegisterSubmodelServiceProvider(submodel.IdShort, submodel.CreateServiceProvider());
+ }
+ ServiceDescriptor = ServiceDescriptor ?? new SubmodelRepositoryDescriptor(submodels, null);
+ }
+ public IEnumerable<ISubmodel> GetBinding()
+ {
+ IEnumerable<ISubmodelServiceProvider> serviceProviders = GetSubmodelServiceProviders();
+ List<ISubmodel> submodels = new List<ISubmodel>();
+ foreach (var serviceProvider in serviceProviders)
+ {
+ ISubmodel binding = serviceProvider.GetBinding();
+ submodels.Add(binding);
+ }
+ return submodels;
+ }
+
+ public IResult<ISubmodel> CreateSubmodel(ISubmodel submodel)
+ {
+ if (submodel == null)
+ return new Result<ISubmodel>(new ArgumentNullException(nameof(submodel)));
+ RegisterSubmodelServiceProvider(submodel.IdShort, submodel.CreateServiceProvider());
+
+ ISubmodelServiceProvider serviceProvider = GetSubmodelServiceProvider(submodel.IdShort);
+ if (serviceProvider != null && serviceProvider.GetBinding() != null)
+ return new Result<ISubmodel>(true, serviceProvider.GetBinding());
+ else
+ return new Result<ISubmodel>(false, new Message(MessageType.Error, "Could not retrieve Submodel Service Provider"));
+ }
+
+ public IResult DeleteSubmodel(string submodelId)
+ {
+ if (string.IsNullOrEmpty(submodelId))
+ return new Result<ISubmodel>(new ArgumentNullException(nameof(submodelId)));
+ UnregisterSubmodelServiceProvider(submodelId);
+ return new Result(true);
+ }
+
+ public ISubmodelServiceProvider GetSubmodelServiceProvider(string id)
+ {
+ if (SubmodelServiceProviders.TryGetValue(id, out ISubmodelServiceProvider submodelServiceProvider))
+ return submodelServiceProvider;
+ else
+ return null;
+ }
+
+ public IEnumerable<ISubmodelServiceProvider> GetSubmodelServiceProviders()
+ {
+ return SubmodelServiceProviders?.Values.ToList();
+ }
+
+ public void RegisterSubmodelServiceProvider(string id, ISubmodelServiceProvider submodelServiceProvider)
+ {
+ if (!SubmodelServiceProviders.ContainsKey(id))
+ SubmodelServiceProviders.Add(id, submodelServiceProvider);
+ }
+
+ public void UnregisterSubmodelServiceProvider(string id)
+ {
+ if (!SubmodelServiceProviders.ContainsKey(id))
+ SubmodelServiceProviders.Remove(id);
+ }
+
+ public IResult<ISubmodel> RetrieveSubmodel(string submodelId)
+ {
+ ISubmodelServiceProvider serviceProvider = GetSubmodelServiceProvider(submodelId);
+ if(serviceProvider != null && serviceProvider.GetBinding() != null)
+ {
+ ISubmodel binding = serviceProvider.GetBinding();
+ return new Result<ISubmodel>(true, binding);
+ }
+ return new Result<ISubmodel>(false, new NotFoundMessage("Submodel Service Provider"));
+ }
+
+ public IResult<IElementContainer<ISubmodel>> RetrieveSubmodels()
+ {
+ return new Result<IElementContainer<ISubmodel>>(true, new ElementContainer<ISubmodel>(Submodels));
+ }
+
+ public IResult UpdateSubmodel(string submodelId, ISubmodel submodel)
+ {
+ if (string.IsNullOrEmpty(submodelId))
+ return new Result<ISubmodel>(new ArgumentNullException(nameof(submodelId)));
+ if (submodel == null)
+ return new Result<ISubmodel>(new ArgumentNullException(nameof(submodel)));
+ return CreateSubmodel(submodel);
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs
index f094312..b4c7aa7 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs
@@ -24,7 +24,7 @@
using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes;
using BaSyx.Models.Communication;
using System.Threading.Tasks;
-
+using BaSyx.Models.Extensions;
namespace BaSyx.API.Components
{
@@ -492,7 +492,44 @@
if (Submodel.SubmodelElements == null)
return new Result<ISubmodelElement>(false, new NotFoundMessage(submodelElementId));
- return Submodel.SubmodelElements.Retrieve(submodelElementId);
+
+ IResult<ISubmodelElement> result;
+ if(submodelElementId.Contains("/"))
+ {
+ string[] smeIds = submodelElementId.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
+ IResult<ISubmodelElement> firstElement = Submodel.SubmodelElements.Retrieve(smeIds[0]);
+ result = RetrieveSubordinateElement(firstElement, smeIds.Skip(1));
+ }
+ else
+ {
+ result = Submodel.SubmodelElements.Retrieve(submodelElementId);
+ }
+ return result;
+ }
+
+ private IResult<ISubmodelElement> RetrieveSubordinateElement(IResult<ISubmodelElement> smElement, IEnumerable<string> idShorts)
+ {
+ if(smElement.Success && smElement.Entity != null)
+ {
+ if(smElement.Entity.ModelType == ModelType.SubmodelElementCollection)
+ {
+ ISubmodelElementCollection smeCollection = smElement.Entity.ToModelElement<ISubmodelElementCollection>();
+ if(idShorts?.Count() > 0 && smeCollection.Value?.Count > 0)
+ {
+ IResult<ISubmodelElement> nextElement = smeCollection.Value.Retrieve(idShorts.First());
+ if (idShorts.Count() > 1)
+ return RetrieveSubordinateElement(nextElement, idShorts.Skip(1));
+ else
+ return nextElement;
+ }
+ }
+ else
+ {
+ if (idShorts.Count() > 0)
+ return new Result<ISubmodelElement>(false, new NotFoundMessage(string.Join("/", idShorts)));
+ }
+ }
+ return smElement;
}
public IResult<IValue> RetrieveSubmodelElementValue(string submodelElementId)
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellAggregatorDescriptor.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellRepositoryDescriptor.cs
similarity index 91%
rename from sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellAggregatorDescriptor.cs
rename to sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellRepositoryDescriptor.cs
index e997965..2add044 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellAggregatorDescriptor.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/AssetAdministrationShellRepositoryDescriptor.cs
@@ -21,7 +21,7 @@
namespace BaSyx.Models.Connectivity.Descriptors
{
[DataContract]
- public class AssetAdministrationShellAggregatorDescriptor : IAssetAdministrationShellAggregatorDescriptor
+ public class AssetAdministrationShellRepositoryDescriptor : IAssetAdministrationShellRepositoryDescriptor
{
[IgnoreDataMember]
public Identifier Identification { get; set; }
@@ -38,18 +38,18 @@
[IgnoreDataMember]
public string Category => null;
- public ModelType ModelType => ModelType.AssetAdministrationShellAggregatorDescriptor;
+ public ModelType ModelType => ModelType.AssetAdministrationShellRepositoryDescriptor;
public IElementContainer<IAssetAdministrationShellDescriptor> AssetAdministrationShellDescriptors { get; set; }
- public AssetAdministrationShellAggregatorDescriptor(IEnumerable<IEndpoint> endpoints)
+ public AssetAdministrationShellRepositoryDescriptor(IEnumerable<IEndpoint> endpoints)
{
Endpoints = endpoints ?? new List<IEndpoint>();
AssetAdministrationShellDescriptors = new ElementContainer<IAssetAdministrationShellDescriptor>();
}
[JsonConstructor]
- public AssetAdministrationShellAggregatorDescriptor(IEnumerable<IAssetAdministrationShell> shells, IEnumerable<IEndpoint> endpoints) : this(endpoints)
+ public AssetAdministrationShellRepositoryDescriptor(IEnumerable<IAssetAdministrationShell> shells, IEnumerable<IEndpoint> endpoints) : this(endpoints)
{
if (shells?.Count() > 0)
foreach (var shell in shells)
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellRepositoryDescriptor.cs
similarity index 92%
rename from sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs
rename to sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellRepositoryDescriptor.cs
index 995c13d..e81aa70 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellRepositoryDescriptor.cs
@@ -13,7 +13,7 @@
namespace BaSyx.Models.Connectivity.Descriptors
{
- public interface IAssetAdministrationShellAggregatorDescriptor : IServiceDescriptor, IModelElement
+ public interface IAssetAdministrationShellRepositoryDescriptor : IServiceDescriptor, IModelElement
{
[DataMember(EmitDefaultValue = false, IsRequired = false, Name = "assetAdministrationShellDescriptors")]
IElementContainer<IAssetAdministrationShellDescriptor> AssetAdministrationShellDescriptors { get; set; }
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/ISubmodelRepositoryDescriptor.cs
similarity index 71%
copy from sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs
copy to sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/ISubmodelRepositoryDescriptor.cs
index 995c13d..08b1dcd 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/IAssetAdministrationShellAggregatorDescriptor.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/ISubmodelRepositoryDescriptor.cs
@@ -13,9 +13,9 @@
namespace BaSyx.Models.Connectivity.Descriptors
{
- public interface IAssetAdministrationShellAggregatorDescriptor : IServiceDescriptor, IModelElement
+ public interface ISubmodelRepositoryDescriptor : IServiceDescriptor, IModelElement
{
- [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "assetAdministrationShellDescriptors")]
- IElementContainer<IAssetAdministrationShellDescriptor> AssetAdministrationShellDescriptors { get; set; }
+ [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "submodelDescriptors")]
+ IElementContainer<ISubmodelDescriptor> SubmodelDescriptors { get; set; }
}
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/SubmodelRepositoryDescriptor.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/SubmodelRepositoryDescriptor.cs
new file mode 100644
index 0000000..6a3b870
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Connectivity/Descriptors/SubmodelRepositoryDescriptor.cs
@@ -0,0 +1,80 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0
+*
+* SPDX-License-Identifier: EPL-2.0
+*******************************************************************************/
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Models.Core.AssetAdministrationShell.References;
+using BaSyx.Models.Core.AssetAdministrationShell.Identification;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using BaSyx.Models.Core.Common;
+using System.Linq;
+using System.Collections;
+
+namespace BaSyx.Models.Connectivity.Descriptors
+{
+ [DataContract]
+ public class SubmodelRepositoryDescriptor : ISubmodelRepositoryDescriptor
+ {
+ [IgnoreDataMember]
+ public Identifier Identification { get; set; }
+ [IgnoreDataMember]
+ public AdministrativeInformation Administration { get; set; }
+ [IgnoreDataMember]
+ public string IdShort { get; set; }
+ [IgnoreDataMember]
+ public LangStringSet Description { get; set; }
+ public IEnumerable<IEndpoint> Endpoints { get; internal set; }
+
+ [IgnoreDataMember]
+ public IReference Parent => null;
+ [IgnoreDataMember]
+ public string Category => null;
+
+ public ModelType ModelType => ModelType.AssetAdministrationShellRepositoryDescriptor;
+
+ public IElementContainer<ISubmodelDescriptor> SubmodelDescriptors { get; set; }
+
+ public SubmodelRepositoryDescriptor(IEnumerable<IEndpoint> endpoints)
+ {
+ Endpoints = endpoints ?? new List<IEndpoint>();
+ SubmodelDescriptors = new ElementContainer<ISubmodelDescriptor>();
+ }
+
+ [JsonConstructor]
+ public SubmodelRepositoryDescriptor(IEnumerable<ISubmodel> submodels, IEnumerable<IEndpoint> endpoints) : this(endpoints)
+ {
+ if (submodels?.Count() > 0)
+ foreach (var submodel in submodels)
+ {
+ AddSubmodel(submodel);
+ }
+ }
+
+ public void AddSubmodel(ISubmodel submodel)
+ {
+ SubmodelDescriptor submodelDescriptor = new SubmodelDescriptor(submodel, Endpoints.ToList());
+ SubmodelDescriptors.Create(submodelDescriptor);
+ }
+
+ public void AddEndpoints(IEnumerable<IEndpoint> endpoints)
+ {
+ foreach (var endpoint in endpoints)
+ {
+ (Endpoints as IList).Add(endpoint);
+ }
+ }
+
+ public void SetEndpoints(IEnumerable<IEndpoint> endpoints)
+ {
+ Endpoints = endpoints;
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Core/Common/ModelType.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Core/Common/ModelType.cs
index a70d9d4..cdbd1f7 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Core/Common/ModelType.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Core/Common/ModelType.cs
@@ -43,7 +43,8 @@
public static readonly ModelType ConceptDescription = new ModelType("ConceptDescription");
public static readonly ModelType ConceptDictionary = new ModelType("ConceptDictionary");
- public static readonly ModelType AssetAdministrationShellAggregatorDescriptor = new ModelType("AssetAdministrationShellAggregatorDescriptor");
+ public static readonly ModelType AssetAdministrationShellRepositoryDescriptor = new ModelType("AssetAdministrationShellRepositoryDescriptor");
+ public static readonly ModelType SubmodelRepositoryDescriptor = new ModelType("SubmodelRepositoryDescriptor");
public static readonly ModelType AssetAdministrationShellDescriptor = new ModelType("AssetAdministrationShellDescriptor");
public static readonly ModelType SubmodelDescriptor = new ModelType("SubmodelDescriptor");
diff --git a/sdks/dotnet/basyx-core/BaSyx.Utils.DependencyInjection/StandardImplementation.cs b/sdks/dotnet/basyx-core/BaSyx.Utils.DependencyInjection/StandardImplementation.cs
index c40b2b9..53a44ad 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Utils.DependencyInjection/StandardImplementation.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Utils.DependencyInjection/StandardImplementation.cs
@@ -31,7 +31,7 @@
services.AddTransient<ISubmodel, Submodel>();
services.AddTransient<IView, View>();
- services.AddTransient<IAssetAdministrationShellAggregatorDescriptor, AssetAdministrationShellAggregatorDescriptor>();
+ services.AddTransient<IAssetAdministrationShellRepositoryDescriptor, AssetAdministrationShellRepositoryDescriptor>();
services.AddTransient<IAssetAdministrationShellDescriptor, AssetAdministrationShellDescriptor>();
services.AddTransient<ISubmodelDescriptor, SubmodelDescriptor>();
services.AddTransient(typeof(IElementContainer<ISubmodelDescriptor>), typeof(ElementContainer<SubmodelDescriptor>));
diff --git a/sdks/dotnet/basyx-examples/BaSyx.Examples.sln b/sdks/dotnet/basyx-examples/BaSyx.Examples.sln
index adcd193..8bbfd07 100644
--- a/sdks/dotnet/basyx-examples/BaSyx.Examples.sln
+++ b/sdks/dotnet/basyx-examples/BaSyx.Examples.sln
@@ -9,6 +9,8 @@
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiAssetAdministrationShell", "MultiAssetAdministrationShell\MultiAssetAdministrationShell.csproj", "{82FDA941-6905-48D5-91FD-2DCF7B97F1C5}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComplexAssetAdministrationShellScenario", "ComplexAssetAdministrationShellScenario\ComplexAssetAdministrationShellScenario.csproj", "{41026E20-E7A5-46BE-B51E-2E11DA085921}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@
{82FDA941-6905-48D5-91FD-2DCF7B97F1C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82FDA941-6905-48D5-91FD-2DCF7B97F1C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82FDA941-6905-48D5-91FD-2DCF7B97F1C5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {41026E20-E7A5-46BE-B51E-2E11DA085921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41026E20-E7A5-46BE-B51E-2E11DA085921}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41026E20-E7A5-46BE-B51E-2E11DA085921}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41026E20-E7A5-46BE-B51E-2E11DA085921}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/ComplexAssetAdministrationShellScenario.csproj b/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/ComplexAssetAdministrationShellScenario.csproj
new file mode 100644
index 0000000..2bf1c17
--- /dev/null
+++ b/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/ComplexAssetAdministrationShellScenario.csproj
@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="BaSyx.AAS.Client.Http" Version="1.0.0" />
+ <PackageReference Include="BaSyx.AAS.Server.Http" Version="1.0.0" />
+ <PackageReference Include="BaSyx.Registry.Client.Http" Version="1.0.0" />
+ <PackageReference Include="BaSyx.Registry.ReferenceImpl.FileBased" Version="1.0.0" />
+ <PackageReference Include="BaSyx.Registry.Server.Http" Version="1.0.0" />
+ <PackageReference Include="BaSyx.Submodel.Client.Http" Version="1.0.0" />
+ <PackageReference Include="BaSyx.Submodel.Server.Http" Version="1.0.0" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\SimpleAssetAdministrationShell\SimpleAssetAdministrationShell.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/Program.cs b/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/Program.cs
new file mode 100644
index 0000000..c5852b6
--- /dev/null
+++ b/sdks/dotnet/basyx-examples/ComplexAssetAdministrationShellScenario/Program.cs
@@ -0,0 +1,272 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Distribution License 1.0 which is available at
+* https://www.eclipse.org/org/documents/edl-v10.html
+*
+*
+*******************************************************************************/
+using BaSyx.AAS.Server.Http;
+using BaSyx.API.AssetAdministrationShell.Extensions;
+using BaSyx.API.Components;
+using BaSyx.Models.Connectivity;
+using BaSyx.Models.Connectivity.Descriptors;
+using BaSyx.Models.Core.AssetAdministrationShell.Enums;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Models.Core.AssetAdministrationShell.Identification;
+using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
+using BaSyx.Models.Core.AssetAdministrationShell.Implementations.SubmodelElementTypes;
+using BaSyx.Models.Core.AssetAdministrationShell.References;
+using BaSyx.Models.Core.Common;
+using BaSyx.Registry.Client.Http;
+using BaSyx.Registry.ReferenceImpl.FileBased;
+using BaSyx.Registry.Server.Http;
+using BaSyx.Submodel.Server.Http;
+using BaSyx.Utils.Settings.Sections;
+using BaSyx.Utils.Settings.Types;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+
+namespace ComplexAssetAdministrationShellScenario
+{
+ class Program
+ {
+ static RegistryHttpClient registryClient;
+ static void Main(string[] args)
+ {
+ Thread.Sleep(5000);
+ registryClient = new RegistryHttpClient();
+ LoadScenario();
+
+ Console.WriteLine("Press enter to quit...");
+ Console.ReadKey();
+ }
+
+ private static void LoadScenario()
+ {
+ LoadRegistry();
+ LoadSingleShell();
+ LoadMultipleShells();
+ LoadMultipleSubmodels();
+ }
+
+ public static void LoadMultipleSubmodels()
+ {
+ ServerSettings submodelRepositorySettings = ServerSettings.CreateSettings();
+ submodelRepositorySettings.ServerConfig.Hosting.ContentPath = "Content";
+ submodelRepositorySettings.ServerConfig.Hosting.Urls.Add("http://+:6999");
+
+ MultiSubmodelHttpServer multiServer = new MultiSubmodelHttpServer(submodelRepositorySettings);
+ SubmodelRepositoryServiceProvider repositoryService = new SubmodelRepositoryServiceProvider();
+
+ for (int i = 0; i < 3; i++)
+ {
+ Submodel submodel = new Submodel()
+ {
+ IdShort = "MultiSubmodel_" + i,
+ Identification = new Identifier("http://basys40.de/submodel/MultiSubmodel/" + Guid.NewGuid().ToString(), KeyType.IRI),
+ Description = new LangStringSet()
+ {
+ new LangString("de-DE", i + ". Teilmodell"),
+ new LangString("en-US", i + ". Submodel")
+ },
+ Administration = new AdministrativeInformation()
+ {
+ Version = "1.0",
+ Revision = "120"
+ },
+ SubmodelElements = new ElementContainer<ISubmodelElement>()
+ {
+ new Property<string>()
+ {
+ IdShort = "Property_" + i,
+ Value = "TestValue_" + i
+ },
+ new SubmodelElementCollection()
+ {
+ IdShort = "Coll_" + i,
+ Value = new ElementContainer<ISubmodelElement>()
+ {
+ new Property<string>()
+ {
+ IdShort = "SubProperty_" + i,
+ Value = "TestSubValue_" + i
+ }
+ }
+ }
+ }
+ };
+
+ var submodelServiceProvider = submodel.CreateServiceProvider();
+ repositoryService.RegisterSubmodelServiceProvider(submodel.IdShort, submodelServiceProvider);
+ }
+
+ List<HttpEndpoint> endpoints = multiServer.Settings.ServerConfig.Hosting.Urls.ConvertAll(c => new HttpEndpoint(c.Replace("+", "127.0.0.1")));
+ repositoryService.UseDefaultEndpointRegistration(endpoints);
+
+ multiServer.SetServiceProvider(repositoryService);
+ multiServer.ApplicationStopping = () =>
+ {
+ for (int i = 0; i < repositoryService.ServiceDescriptor.SubmodelDescriptors.Count; i++)
+ {
+ registryClient.DeleteSubmodel("http://basyx.de/shells/MultiAAS/" + i, repositoryService.ServiceDescriptor.SubmodelDescriptors[i].IdShort);
+ }
+ };
+
+ multiServer.RunAsync();
+
+ var shells = registryClient.RetrieveAssetAdministrationShells();
+ var shell = shells.Entity?.FirstOrDefault(f => f.Identification.Id.Contains("SimpleAAS"));
+ for (int i = 0; i < repositoryService.ServiceDescriptor.SubmodelDescriptors.Count; i++)
+ {
+ registryClient.CreateSubmodel("http://basyx.de/shells/MultiAAS/" + i, repositoryService.ServiceDescriptor.SubmodelDescriptors[i]);
+
+ if(shell != null)
+ registryClient.CreateSubmodel(shell.Identification.Id, repositoryService.ServiceDescriptor.SubmodelDescriptors[i]);
+ }
+ }
+
+
+ private static void LoadMultipleShells()
+ {
+ ServerSettings aasRepositorySettings = ServerSettings.CreateSettings();
+ aasRepositorySettings.ServerConfig.Hosting.ContentPath = "Content";
+ aasRepositorySettings.ServerConfig.Hosting.Urls.Add("http://+:5999");
+
+ MultiAssetAdministrationShellHttpServer multiServer = new MultiAssetAdministrationShellHttpServer(aasRepositorySettings);
+ AssetAdministrationShellRepositoryServiceProvider repositoryService = new AssetAdministrationShellRepositoryServiceProvider();
+
+ for (int i = 0; i < 3; i++)
+ {
+ AssetAdministrationShell aas = new AssetAdministrationShell()
+ {
+ IdShort = "MultiAAS_" + i,
+ Identification = new Identifier("http://basyx.de/shells/MultiAAS/" + i, KeyType.IRI),
+ Description = new LangStringSet()
+ {
+ new LangString("de-DE", i + ". VWS"),
+ new LangString("en-US", i + ". AAS")
+ },
+ Administration = new AdministrativeInformation()
+ {
+ Version = "1.0",
+ Revision = "120"
+ },
+ Asset = new Asset()
+ {
+ IdShort = "Asset_" + i,
+ Identification = new Identifier("http://basyx.de/assets/MultiAsset/" + i, KeyType.IRI),
+ Kind = AssetKind.Instance,
+ Description = new LangStringSet()
+ {
+ new LangString("de-DE", i + ". Asset"),
+ new LangString("en-US", i + ". Asset")
+ }
+ }
+ };
+
+ aas.Submodels.Create(new Submodel()
+ {
+ Identification = new Identifier("http://basyx.de/submodels/" + i, KeyType.IRI),
+ IdShort = "TestSubmodel",
+ SubmodelElements = new ElementContainer<ISubmodelElement>()
+ {
+ new Property<string>()
+ {
+ IdShort = "Property_" + i,
+ Value = "TestValue_" + i
+ },
+ new SubmodelElementCollection()
+ {
+ IdShort = "Coll_" + i,
+ Value = new ElementContainer<ISubmodelElement>()
+ {
+ new Property<string>()
+ {
+ IdShort = "SubProperty_" + i,
+ Value = "TestSubValue_" + i
+ }
+ }
+ }
+ }
+ });
+
+ var aasServiceProvider = aas.CreateServiceProvider(true);
+ repositoryService.RegisterAssetAdministrationShellServiceProvider(aas.IdShort, aasServiceProvider);
+ }
+
+ List<HttpEndpoint> endpoints = multiServer.Settings.ServerConfig.Hosting.Urls.ConvertAll(c => new HttpEndpoint(c.Replace("+", "127.0.0.1")));
+ repositoryService.UseDefaultEndpointRegistration(endpoints);
+
+ multiServer.SetServiceProvider(repositoryService);
+ multiServer.ApplicationStopping = () =>
+ {
+ foreach (var aasDescriptor in repositoryService.ServiceDescriptor.AssetAdministrationShellDescriptors)
+ {
+ registryClient.DeleteAssetAdministrationShell(aasDescriptor.Identification.Id);
+ }
+ };
+
+ multiServer.RunAsync();
+
+ foreach (var aasDescriptor in repositoryService.ServiceDescriptor.AssetAdministrationShellDescriptors)
+ {
+ registryClient.CreateAssetAdministrationShell(aasDescriptor);
+ }
+
+ }
+
+ private static void LoadSingleShell()
+ {
+ AssetAdministrationShell aas = SimpleAssetAdministrationShell.SimpleAssetAdministrationShell.GetAssetAdministrationShell();
+ ISubmodel testSubmodel = aas.Submodels["TestSubmodel"];
+
+ ServerSettings submodelServerSettings = ServerSettings.CreateSettings();
+ submodelServerSettings.ServerConfig.Hosting.ContentPath = "Content";
+ submodelServerSettings.ServerConfig.Hosting.Urls.Add("http://localhost:5222");
+
+ SubmodelHttpServer submodelServer = new SubmodelHttpServer(submodelServerSettings);
+ ISubmodelServiceProvider submodelServiceProvider = testSubmodel.CreateServiceProvider();
+ submodelServer.SetServiceProvider(submodelServiceProvider);
+ submodelServiceProvider.UseAutoEndpointRegistration(submodelServerSettings.ServerConfig);
+ submodelServer.RunAsync();
+
+ ServerSettings aasServerSettings = ServerSettings.CreateSettings();
+ aasServerSettings.ServerConfig.Hosting.ContentPath = "Content";
+ aasServerSettings.ServerConfig.Hosting.Urls.Add("http://localhost:5111");
+
+ IAssetAdministrationShellServiceProvider aasServiceProvider = aas.CreateServiceProvider(true);
+ aasServiceProvider.SubmodelRegistry.RegisterSubmodelServiceProvider(testSubmodel.IdShort, submodelServiceProvider);
+ aasServiceProvider.UseAutoEndpointRegistration(aasServerSettings.ServerConfig);
+
+ AssetAdministrationShellHttpServer aasServer = new AssetAdministrationShellHttpServer(aasServerSettings);
+ aasServer.SetServiceProvider(aasServiceProvider);
+ aasServer.ApplicationStopping = () => { registryClient.DeleteAssetAdministrationShell(aas.Identification.Id); };
+ aasServer.RunAsync();
+
+ registryClient.CreateAssetAdministrationShell(new AssetAdministrationShellDescriptor(aas, aasServiceProvider.ServiceDescriptor.Endpoints));
+ registryClient.CreateSubmodel(aas.Identification.Id, new SubmodelDescriptor(testSubmodel, submodelServiceProvider.ServiceDescriptor.Endpoints));
+ }
+
+ private static void LoadRegistry()
+ {
+ ServerSettings registrySettings = ServerSettings.CreateSettings();
+ registrySettings.ServerConfig.Hosting = new HostingConfiguration()
+ {
+ Urls = new List<string>()
+ {
+ "http://localhost:4999"
+ }
+ };
+
+ RegistryHttpServer registryServer = new RegistryHttpServer(registrySettings);
+ FileBasedRegistry fileBasedRegistry = new FileBasedRegistry();
+ registryServer.SetRegistryProvider(fileBasedRegistry);
+ registryServer.RunAsync();
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
index 957df78..997c9ec 100644
--- a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
+++ b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
@@ -29,12 +29,12 @@
{
static void Main(string[] args)
{
- ServerSettings aasAggregatorSettings = ServerSettings.CreateSettings();
- aasAggregatorSettings.ServerConfig.Hosting.ContentPath = "Content";
- aasAggregatorSettings.ServerConfig.Hosting.Urls.Add("http://+:5999");
+ ServerSettings aasRepositorySettings = ServerSettings.CreateSettings();
+ aasRepositorySettings.ServerConfig.Hosting.ContentPath = "Content";
+ aasRepositorySettings.ServerConfig.Hosting.Urls.Add("http://+:5999");
- MultiAssetAdministrationShellHttpServer server = new MultiAssetAdministrationShellHttpServer(aasAggregatorSettings);
- AssetAdministrationShellAggregatorServiceProvider aggregatorService = new AssetAdministrationShellAggregatorServiceProvider();
+ MultiAssetAdministrationShellHttpServer server = new MultiAssetAdministrationShellHttpServer(aasRepositorySettings);
+ AssetAdministrationShellRepositoryServiceProvider repositoryService = new AssetAdministrationShellRepositoryServiceProvider();
for (int i = 0; i < 10; i++)
{
@@ -79,13 +79,13 @@
});
var aasServiceProvider = aas.CreateServiceProvider(true);
- aggregatorService.RegisterAssetAdministrationShellServiceProvider(aas.IdShort, aasServiceProvider);
+ repositoryService.RegisterAssetAdministrationShellServiceProvider(aas.IdShort, aasServiceProvider);
}
List<HttpEndpoint> endpoints = server.Settings.ServerConfig.Hosting.Urls.ConvertAll(c => new HttpEndpoint(c.Replace("+", "127.0.0.1")));
- aggregatorService.UseDefaultEndpointRegistration(endpoints);
+ repositoryService.UseDefaultEndpointRegistration(endpoints);
- server.SetServiceProvider(aggregatorService);
+ server.SetServiceProvider(repositoryService);
server.Run();
}
}
diff --git a/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/Program.cs b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/Program.cs
index e039d64..b168091 100644
--- a/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/Program.cs
+++ b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/Program.cs
@@ -11,17 +11,9 @@
using BaSyx.AAS.Server.Http;
using BaSyx.API.AssetAdministrationShell.Extensions;
using BaSyx.API.Components;
-using BaSyx.Models.Core.AssetAdministrationShell.Enums;
using BaSyx.Models.Core.AssetAdministrationShell.Generics;
-using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes;
-using BaSyx.Models.Core.AssetAdministrationShell.Identification;
using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
-using BaSyx.Models.Core.AssetAdministrationShell.Implementations.SubmodelElementTypes;
-using BaSyx.Models.Core.AssetAdministrationShell.References;
-using BaSyx.Models.Core.Common;
-using BaSyx.Models.Extensions;
using BaSyx.Submodel.Server.Http;
-using BaSyx.Utils.ResultHandling;
using BaSyx.Utils.Settings.Types;
using System;
using System.Threading.Tasks;
@@ -33,156 +25,9 @@
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
- string propertyValue = "TestFromInside";
- int i = 0;
- double y = 2.0;
- Submodel identificationSubmodel = new Submodel()
- {
- Identification = new Identifier(Guid.NewGuid().ToString(), KeyType.Custom),
- IdShort = "AssetIdentification"
- };
-
- AssetAdministrationShell aas = new AssetAdministrationShell()
- {
- IdShort = "SimpleAAS",
- Identification = new Identifier("http://basys40.de/shells/SimpleAAS/" + Guid.NewGuid().ToString(), KeyType.IRI),
- Description = new LangStringSet()
- {
- new LangString("de-DE", "Einfache VWS"),
- new LangString("en-US", "Simple AAS")
- },
- Administration = new AdministrativeInformation()
- {
- Version = "1.0",
- Revision = "120"
- },
- Asset = new Asset()
- {
- IdShort = "SimpleAsset",
- Identification = new Identifier("http://basys40.de/assets/SimpleAsset/" + Guid.NewGuid().ToString(), KeyType.IRI),
- Kind = AssetKind.Instance,
- Description = new LangStringSet()
- {
- new LangString("de-DE", "Einfaches Asset"),
- new LangString("en-US", "Simple Asset")
- },
- AssetIdentificationModel = new Reference<Submodel>(identificationSubmodel)
- }
- };
-
- Submodel testSubmodel = new Submodel()
- {
- IdShort = "TestSubmodel",
- Identification = new Identifier(Guid.NewGuid().ToString(), KeyType.Custom),
- SubmodelElements = new ElementContainer<ISubmodelElement>()
- {
- new Property<string>()
- {
- IdShort = "TestProperty1",
- Set = (prop, val) => propertyValue = val,
- Get = prop => { return propertyValue + "_" + i++; }
- },
- new Property<string>()
- {
- IdShort = "TestProperty2",
- Set = (prop, val) => propertyValue = val,
- Get = prop => { return propertyValue + "_" + i++; }
- },
- new Property<int>()
- {
- IdShort = "TestProperty3",
- Set = (prop, val) => i = val,
- Get = prop => { return i++; }
- },
- new Property<double>()
- {
- IdShort = "TestProperty4",
- Set = (prop, val) => y = val,
- Get = prop => { return Math.Pow(y, i); }
- },
- new Operation()
- {
- IdShort = "GetTime",
- OutputVariables = new OperationVariableSet()
- {
- new Property<string>()
- {
- IdShort = "Date"
- },
- new Property<string>()
- {
- IdShort = "Time"
- },
- new Property<string>()
- {
- IdShort = "Ticks"
- },
- },
- OnMethodCalled = (op, inArgs, outArgs) =>
- {
- outArgs.Add(new Property<string>() { IdShort = "Date", Value = "Heute ist der " + DateTime.Now.Date.ToString() });
- outArgs.Add(new Property<string>() { IdShort = "Time", Value = "Es ist " + DateTime.Now.TimeOfDay.ToString() + " Uhr" });
- outArgs.Add(new Property<string>() { IdShort = "Ticks", Value = "Ticks: " + DateTime.Now.Ticks.ToString() });
- return new OperationResult(true);
- }
- },
- new Operation()
- {
- IdShort = "Calculate",
- Description = new LangStringSet()
- {
- new LangString("DE", "Taschenrechner mit simulierter langer Rechenzeit zum Testen von asynchronen Aufrufen"),
- new LangString("EN", "Calculator with simulated long-running computing time for testing asynchronous calls")
- },
- InputVariables = new OperationVariableSet()
- {
- new Property<string>()
- {
- IdShort = "Expression",
- Description = new LangStringSet()
- {
- new LangString("DE", "Ein mathematischer Ausdruck (z.B. 5*9)"),
- new LangString("EN", "A mathematical expression (e.g. 5*9)")
- }
- },
- new Property<int>()
- {
- IdShort = "ComputingTime",
- Description = new LangStringSet()
- {
- new LangString("DE", "Die Bearbeitungszeit in Millisekunden"),
- new LangString("EN", "The computation time in milliseconds")
- }
- }
- },
- OutputVariables = new OperationVariableSet()
- {
- new Property<double>()
- {
- IdShort = "Result"
- }
- },
- OnMethodCalled = async (op, inArgs, outArgs) =>
- {
- string expression = inArgs.Get("Expression")?.ToModelElement<IProperty>()?.ToObject<string>();
- int? computingTime = inArgs.Get("ComputingTime")?.ToModelElement<IProperty>()?.ToObject<int>();
-
- if(computingTime.HasValue)
- await Task.Delay(computingTime.Value);
-
- double value = CalulcateExpression(expression);
-
- outArgs.Add(new Property<double>() { IdShort = "Result", Value = value });
-
- return new OperationResult(true);
- }
- }
-
- }
- };
- aas.Submodels.Add(identificationSubmodel);
- aas.Submodels.Add(testSubmodel);
+ AssetAdministrationShell aas = SimpleAssetAdministrationShell.GetAssetAdministrationShell();
+ ISubmodel testSubmodel = aas.Submodels["TestSubmodel"];
ServerSettings submodelServerSettings = ServerSettings.CreateSettings();
submodelServerSettings.ServerConfig.Hosting.ContentPath = "Content";
@@ -207,15 +52,7 @@
aasServer.Run();
}
- public static double CalulcateExpression(string expression)
- {
- string columnName = "Evaluation";
- System.Data.DataTable dataTable = new System.Data.DataTable();
- System.Data.DataColumn dataColumn = new System.Data.DataColumn(columnName, typeof(double), expression);
- dataTable.Columns.Add(dataColumn);
- dataTable.Rows.Add(0);
- return (double)(dataTable.Rows[0][columnName]);
- }
+
}
}
diff --git a/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.cs b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.cs
new file mode 100644
index 0000000..caa6631
--- /dev/null
+++ b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.cs
@@ -0,0 +1,193 @@
+/*******************************************************************************
+* Copyright (c) 2020 Robert Bosch GmbH
+* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Distribution License 1.0 which is available at
+* https://www.eclipse.org/org/documents/edl-v10.html
+*
+*
+*******************************************************************************/
+using BaSyx.Models.Core.AssetAdministrationShell.Enums;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics;
+using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes;
+using BaSyx.Models.Core.AssetAdministrationShell.Identification;
+using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
+using BaSyx.Models.Core.AssetAdministrationShell.Implementations.SubmodelElementTypes;
+using BaSyx.Models.Core.AssetAdministrationShell.References;
+using BaSyx.Models.Core.Common;
+using BaSyx.Models.Extensions;
+using BaSyx.Utils.ResultHandling;
+using System;
+using System.Threading.Tasks;
+
+namespace SimpleAssetAdministrationShell
+{
+ public static class SimpleAssetAdministrationShell
+ {
+ public static AssetAdministrationShell GetAssetAdministrationShell()
+ {
+ AssetAdministrationShell aas = new AssetAdministrationShell()
+ {
+ IdShort = "SimpleAAS",
+ Identification = new Identifier("http://basys40.de/shells/SimpleAAS/" + Guid.NewGuid().ToString(), KeyType.IRI),
+ Description = new LangStringSet()
+ {
+ new LangString("de-DE", "Einfache VWS"),
+ new LangString("en-US", "Simple AAS")
+ },
+ Administration = new AdministrativeInformation()
+ {
+ Version = "1.0",
+ Revision = "120"
+ },
+ Asset = new Asset()
+ {
+ IdShort = "SimpleAsset",
+ Identification = new Identifier("http://basys40.de/assets/SimpleAsset/" + Guid.NewGuid().ToString(), KeyType.IRI),
+ Kind = AssetKind.Instance,
+ Description = new LangStringSet()
+ {
+ new LangString("de-DE", "Einfaches Asset"),
+ new LangString("en-US", "Simple Asset")
+ }
+ }
+ };
+
+ Submodel testSubmodel = GetTestSubmodel();
+
+ aas.Submodels.Add(testSubmodel);
+
+ return aas;
+ }
+
+ public static Submodel GetTestSubmodel()
+ {
+ string propertyValue = "TestFromInside";
+ int i = 0;
+ double y = 2.0;
+
+ Submodel testSubmodel = new Submodel()
+ {
+ IdShort = "TestSubmodel",
+ Identification = new Identifier(Guid.NewGuid().ToString(), KeyType.Custom),
+ SubmodelElements = new ElementContainer<ISubmodelElement>()
+ {
+ new Property<string>()
+ {
+ IdShort = "TestProperty1",
+ Set = (prop, val) => propertyValue = val,
+ Get = prop => { return propertyValue + "_" + i++; }
+ },
+ new Property<string>()
+ {
+ IdShort = "TestProperty2",
+ Set = (prop, val) => propertyValue = val,
+ Get = prop => { return propertyValue + "_" + i++; }
+ },
+ new Property<int>()
+ {
+ IdShort = "TestProperty3",
+ Set = (prop, val) => i = val,
+ Get = prop => { return i++; }
+ },
+ new Property<double>()
+ {
+ IdShort = "TestProperty4",
+ Set = (prop, val) => y = val,
+ Get = prop => { return Math.Pow(y, i); }
+ },
+ new Operation()
+ {
+ IdShort = "GetTime",
+ OutputVariables = new OperationVariableSet()
+ {
+ new Property<string>()
+ {
+ IdShort = "Date"
+ },
+ new Property<string>()
+ {
+ IdShort = "Time"
+ },
+ new Property<string>()
+ {
+ IdShort = "Ticks"
+ },
+ },
+ OnMethodCalled = (op, inArgs, outArgs) =>
+ {
+ outArgs.Add(new Property<string>() { IdShort = "Date", Value = "Heute ist der " + DateTime.Now.Date.ToString() });
+ outArgs.Add(new Property<string>() { IdShort = "Time", Value = "Es ist " + DateTime.Now.TimeOfDay.ToString() + " Uhr" });
+ outArgs.Add(new Property<string>() { IdShort = "Ticks", Value = "Ticks: " + DateTime.Now.Ticks.ToString() });
+ return new OperationResult(true);
+ }
+ },
+ new Operation()
+ {
+ IdShort = "Calculate",
+ Description = new LangStringSet()
+ {
+ new LangString("DE", "Taschenrechner mit simulierter langer Rechenzeit zum Testen von asynchronen Aufrufen"),
+ new LangString("EN", "Calculator with simulated long-running computing time for testing asynchronous calls")
+ },
+ InputVariables = new OperationVariableSet()
+ {
+ new Property<string>()
+ {
+ IdShort = "Expression",
+ Description = new LangStringSet()
+ {
+ new LangString("DE", "Ein mathematischer Ausdruck (z.B. 5*9)"),
+ new LangString("EN", "A mathematical expression (e.g. 5*9)")
+ }
+ },
+ new Property<int>()
+ {
+ IdShort = "ComputingTime",
+ Description = new LangStringSet()
+ {
+ new LangString("DE", "Die Bearbeitungszeit in Millisekunden"),
+ new LangString("EN", "The computation time in milliseconds")
+ }
+ }
+ },
+ OutputVariables = new OperationVariableSet()
+ {
+ new Property<double>()
+ {
+ IdShort = "Result"
+ }
+ },
+ OnMethodCalled = async (op, inArgs, outArgs) =>
+ {
+ string expression = inArgs.Get("Expression")?.ToModelElement<IProperty>()?.ToObject<string>();
+ int? computingTime = inArgs.Get("ComputingTime")?.ToModelElement<IProperty>()?.ToObject<int>();
+
+ if(computingTime.HasValue)
+ await Task.Delay(computingTime.Value);
+
+ double value = CalulcateExpression(expression);
+
+ outArgs.Add(new Property<double>() { IdShort = "Result", Value = value });
+
+ return new OperationResult(true);
+ }
+ }
+
+ }
+ };
+ return testSubmodel;
+ }
+
+ public static double CalulcateExpression(string expression)
+ {
+ string columnName = "Evaluation";
+ System.Data.DataTable dataTable = new System.Data.DataTable();
+ System.Data.DataColumn dataColumn = new System.Data.DataColumn(columnName, typeof(double), expression);
+ dataTable.Columns.Add(dataColumn);
+ dataTable.Rows.Add(0);
+ return (double)(dataTable.Rows[0][columnName]);
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.nupkg
index 71eab9c..e84c8a6 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.symbols.nupkg
index 6578406..0b5fc35 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.AAS.Client.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.nupkg
index a537c58..00d8afc 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.symbols.nupkg
index 8730115..e80cd28 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.AAS.Server.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.nupkg
index 5d8d1c2..b9a3531 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.symbols.nupkg
index 211389f..f81e429 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.nupkg
index e9d4163..723072d 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.symbols.nupkg
index ab3d721..7a2541e 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.nupkg
index d43c72e..a8a9e72 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.symbols.nupkg
index a0cecb8..4cd6882 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.API.Http.Controllers.AASX.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.nupkg
index cde9c0c..8496b0c 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.symbols.nupkg
index 8767b25..167e221 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.nupkg
index ffee8bd..e14407b 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.symbols.nupkg
index 3451f63..7bae565 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Discovery.mDNS.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.nupkg
index e0264e4..6669f10 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.symbols.nupkg
index 7ec862d..b5759a4 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Models.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.nupkg
index d72105c..bdad639 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.symbols.nupkg
index a735ef8..3d603ba 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Models.Export.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.nupkg
index 1048729..2cd453c 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.symbols.nupkg
index 7d11096..1296bf8 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.Client.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.nupkg
index 4f40401..d4d176b 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.symbols.nupkg
index a0cd9b8..1d5f7e5 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.ReferenceImpl.FileBased.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.nupkg
index bccc5d0..320c71e 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.symbols.nupkg
index 734a9d9..18221c2 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Registry.Server.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.nupkg
index c741e56..c8fc637 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.symbols.nupkg
index c799bac..74378e9 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Client.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.nupkg
index eadb8c4..bb86738 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.symbols.nupkg
index 4921a9f..7f98e18 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.Server.Http.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.nupkg
index 9b1ea3a..f708952 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.symbols.nupkg
index f080da1..18830bb 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Submodel.ServiceProvider.Distributed.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.nupkg
index 8192aff..6021930 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.symbols.nupkg
index 686c0bf..42d5425 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.nupkg
index 5d47c09..1a34b5f 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.symbols.nupkg
index c65513b..422db29 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.Client.Mqtt.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.nupkg
index d7c10a9..d8f45c3 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.symbols.nupkg
index d36c1f3..1301d83 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.nupkg
index 182f72a..2dfe032 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.symbols.nupkg
index c331a89..d0d18b7 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Utils.DependencyInjection.Abstractions.1.0.0.symbols.nupkg
Binary files differ