One hell of a change
diff --git a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellController.cs b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellController.cs
index ce24dc6..77ddc98 100644
--- a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellController.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellController.cs
@@ -98,6 +98,14 @@
if (submodel == null)
return ResultHandling.NullResult(nameof(submodel));
+ if (submodelIdShort != submodel.IdShort)
+ {
+ Result badRequestResult = new Result(false,
+ new Message(MessageType.Error, $"Passed path parameter {submodelIdShort} does not equal the Submodel's IdShort {submodel.IdShort}", "400"));
+
+ return badRequestResult.CreateActionResult(CrudOperation.Create, "aas/submodels/" + submodelIdShort);
+ }
+
var spEndpoints = serviceProvider
.ServiceDescriptor
.Endpoints
diff --git a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryController.cs b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryController.cs
index c65e973..20ae816 100644
--- a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryController.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/AssetAdministrationShellRepositoryController.cs
@@ -15,6 +15,7 @@
using BaSyx.API.Components;
using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
using BaSyx.Models.Communication;
+using System.Web;
namespace BaSyx.API.Http.Controllers
{
@@ -63,6 +64,8 @@
if (string.IsNullOrEmpty(aasId))
return ResultHandling.NullResult(nameof(aasId));
+ aasId = HttpUtility.UrlDecode(aasId);
+
var result = serviceProvider.RetrieveAssetAdministrationShell(aasId);
return result.CreateActionResult(CrudOperation.Retrieve);
}
@@ -86,8 +89,18 @@
if (aas == null)
return ResultHandling.NullResult(nameof(aas));
+ aasId = HttpUtility.UrlDecode(aasId);
+
+ if (aasId != aas.Identification.Id)
+ {
+ Result badRequestResult = new Result(false,
+ new Message(MessageType.Error, $"Passed path parameter {aasId} does not equal the Asset Administration Shells's id {aas.Identification.Id}", "400"));
+
+ return badRequestResult.CreateActionResult(CrudOperation.Create, $"shells/{aasId}");
+ }
+
var result = serviceProvider.CreateAssetAdministrationShell(aas);
- return result.CreateActionResult(CrudOperation.Create);
+ return result.CreateActionResult(CrudOperation.Create, $"shells/{aasId}");
}
/// <summary>
/// Deletes a specific Asset Administration Shell at the Asset Administration Shell repository
@@ -103,6 +116,8 @@
if (string.IsNullOrEmpty(aasId))
return ResultHandling.NullResult(nameof(aasId));
+ aasId = HttpUtility.UrlDecode(aasId);
+
var result = serviceProvider.DeleteAssetAdministrationShell(aasId);
return result.CreateActionResult(CrudOperation.Delete);
}
@@ -422,14 +437,19 @@
provider = null;
return true;
}
- provider = serviceProvider.GetAssetAdministrationShellServiceProvider(aasId);
- if (provider == null)
+ aasId = HttpUtility.UrlDecode(aasId);
+ var retrievedProvider = serviceProvider.GetAssetAdministrationShellServiceProvider(aasId);
+ if (retrievedProvider.TryGetEntity(out provider))
{
+ result = null;
+ return false;
+ }
+ else
+ {
+ provider = null;
result = NotFound(new Result(false, new NotFoundMessage("Asset Administration Shell Provider")));
return true;
}
- result = null;
- return false;
}
#endregion
diff --git a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryController.cs b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryController.cs
index 2dee9b4..038d38e 100644
--- a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryController.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/AssetAdministrationShell/SubmodelRepositoryController.cs
@@ -15,6 +15,7 @@
using BaSyx.API.Components;
using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
using BaSyx.Models.Communication;
+using System.Web;
namespace BaSyx.API.Http.Controllers
{
@@ -63,6 +64,8 @@
if (string.IsNullOrEmpty(submodelId))
return ResultHandling.NullResult(nameof(submodelId));
+ submodelId = HttpUtility.UrlDecode(submodelId);
+
var result = serviceProvider.RetrieveSubmodel(submodelId);
return result.CreateActionResult(CrudOperation.Retrieve);
}
@@ -86,6 +89,16 @@
if (submodel == null)
return ResultHandling.NullResult(nameof(submodel));
+ submodelId = HttpUtility.UrlDecode(submodelId);
+
+ if (submodelId != submodel.Identification.Id)
+ {
+ Result badRequestResult = new Result(false,
+ new Message(MessageType.Error, $"Passed path parameter {submodelId} does not equal the Submodel's Id {submodel.Identification.Id}", "400"));
+
+ return badRequestResult.CreateActionResult(CrudOperation.Create, "submodels/" + submodelId);
+ }
+
var result = serviceProvider.CreateSubmodel(submodel);
return result.CreateActionResult(CrudOperation.Create, "submodels/"+ submodelId);
}
@@ -103,6 +116,8 @@
if (string.IsNullOrEmpty(submodelId))
return ResultHandling.NullResult(nameof(submodelId));
+ submodelId = HttpUtility.UrlDecode(submodelId);
+
var result = serviceProvider.DeleteSubmodel(submodelId);
return result.CreateActionResult(CrudOperation.Delete);
}
@@ -181,11 +196,11 @@
/// <returns></returns>
/// <response code="200">Returns the requested Submodel-Element</response>
/// <response code="404">Submodel / Submodel-Element not found</response>
- [HttpGet("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}", Name = "SubmodelRepo_GetSubmodelElementByIdShort")]
+ [HttpGet("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}", Name = "SubmodelRepo_GetSubmodelElementById")]
[Produces("application/json")]
[ProducesResponseType(typeof(SubmodelElement), 200)]
[ProducesResponseType(typeof(Result), 404)]
- public IActionResult SubmodelRepo_GetSubmodelElementByIdShort(string submodelId, string seIdShortPath)
+ public IActionResult SubmodelRepo_GetSubmodelElementById(string submodelId, string seIdShortPath)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -203,12 +218,12 @@
/// <response code="200">Returns the value of a specific Submodel-Element</response>
/// <response code="404">Submodel / Submodel-Element not found</response>
/// <response code="405">Method not allowed</response>
- [HttpGet("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}/value", Name = "SubmodelRepo_GetSubmodelElementValueByIdShort")]
+ [HttpGet("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}/value", Name = "SubmodelRepo_GetSubmodelElementValueById")]
[Produces("application/json")]
[ProducesResponseType(typeof(object), 200)]
[ProducesResponseType(typeof(Result), 404)]
[ProducesResponseType(typeof(Result), 405)]
- public IActionResult SubmodelRepo_GetSubmodelElementValueByIdShort(string submodelId, string seIdShortPath)
+ public IActionResult SubmodelRepo_GetSubmodelElementValueById(string submodelId, string seIdShortPath)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -227,12 +242,12 @@
/// <response code="200">Submodel-Element's value changed successfully</response>
/// <response code="404">Submodel / Submodel-Element not found</response>
/// <response code="405">Method not allowed</response>
- [HttpPut("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}/value", Name = "SubmodelRepo_PutSubmodelElementValueByIdShort")]
+ [HttpPut("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}/value", Name = "SubmodelRepo_PutSubmodelElementValueById")]
[Produces("application/json")]
[Consumes("application/json")]
[ProducesResponseType(typeof(ElementValue), 200)]
[ProducesResponseType(typeof(Result), 404)]
- public IActionResult SubmodelRepo_PutSubmodelElementValueByIdShort(string submodelId, string seIdShortPath, [FromBody] object value)
+ public IActionResult SubmodelRepo_PutSubmodelElementValueById(string submodelId, string seIdShortPath, [FromBody] object value)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -249,10 +264,10 @@
/// <returns></returns>
/// <response code="204">Submodel-Element deleted successfully</response>
/// <response code="404">Submodel / Submodel-Element not found</response>
- [HttpDelete("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}", Name = "SubmodelRepo_DeleteSubmodelElementByIdShort")]
+ [HttpDelete("submodels/{submodelId}/submodel/submodelElements/{seIdShortPath}", Name = "SubmodelRepo_DeleteSubmodelElementById")]
[Produces("application/json")]
[ProducesResponseType(typeof(Result), 200)]
- public IActionResult SubmodelRepo_DeleteSubmodelElementByIdShort(string submodelId, string seIdShortPath)
+ public IActionResult SubmodelRepo_DeleteSubmodelElementById(string submodelId, string seIdShortPath)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -272,12 +287,12 @@
/// <response code="200">Operation invoked successfully</response>
/// <response code="400">Bad Request</response>
/// <response code="404">Submodel / Method handler not found</response>
- [HttpPost("submodels/{submodelId}/submodel/submodelElements/{idShortPathToOperation}/invoke", Name = "SubmodelRepo_InvokeOperationByIdShort")]
+ [HttpPost("submodels/{submodelId}/submodel/submodelElements/{idShortPathToOperation}/invoke", Name = "SubmodelRepo_InvokeOperationById")]
[Produces("application/json")]
[Consumes("application/json")]
[ProducesResponseType(typeof(Result), 400)]
[ProducesResponseType(typeof(Result), 404)]
- public IActionResult SubmodelRepo_InvokeOperationByIdShort(string submodelId, string idShortPathToOperation, [FromBody] InvocationRequest invocationRequest, [FromQuery] bool async)
+ public IActionResult SubmodelRepo_InvokeOperationById(string submodelId, string idShortPathToOperation, [FromBody] InvocationRequest invocationRequest, [FromQuery] bool async)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -296,12 +311,12 @@
/// <response code="200">Result found</response>
/// <response code="400">Bad Request</response>
/// <response code="404">Submodel / Operation / Request not found</response>
- [HttpGet("submodels/{submodelId}/submodel/submodelElements/{idShortPathToOperation}/invocationList/{requestId}", Name = "SubmodelRepo_GetInvocationResultByIdShort")]
+ [HttpGet("submodels/{submodelId}/submodel/submodelElements/{idShortPathToOperation}/invocationList/{requestId}", Name = "SubmodelRepo_GetInvocationResultById")]
[Produces("application/json")]
[ProducesResponseType(typeof(InvocationResponse), 200)]
[ProducesResponseType(typeof(Result), 400)]
[ProducesResponseType(typeof(Result), 404)]
- public IActionResult SubmodelRepo_GetInvocationResultByIdShort(string submodelId, string idShortPathToOperation, string requestId)
+ public IActionResult SubmodelRepo_GetInvocationResultById(string submodelId, string idShortPathToOperation, string requestId)
{
if (IsNullOrNotFound(submodelId, out IActionResult result, out ISubmodelServiceProvider provider))
return result;
@@ -327,14 +342,19 @@
provider = null;
return true;
}
- provider = serviceProvider.GetSubmodelServiceProvider(submodelId);
- if (provider == null)
+ submodelId = HttpUtility.UrlDecode(submodelId);
+ var retrievedProvider = serviceProvider.GetSubmodelServiceProvider(submodelId);
+ if (retrievedProvider.TryGetEntity(out provider))
{
+ result = null;
+ return false;
+ }
+ else
+ {
+ provider = null;
result = NotFound(new Result(false, new NotFoundMessage("Submodel Provider")));
return true;
}
- result = null;
- return false;
}
#endregion
diff --git a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
index 3af001e..e6a6838 100644
--- a/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
+++ b/sdks/dotnet/basyx-components/BaSyx.API.Http.Controllers/BaSyx.API.Http.Controllers.xml
@@ -557,7 +557,7 @@
<response code="400">Bad Request</response>
<response code="404">Submodel not found</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetSubmodelElementByIdShort(System.String,System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetSubmodelElementById(System.String,System.String)">
<summary>
Retrieves a specific Submodel-Element from the Submodel
</summary>
@@ -567,7 +567,7 @@
<response code="200">Returns the requested Submodel-Element</response>
<response code="404">Submodel / Submodel-Element not found</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetSubmodelElementValueByIdShort(System.String,System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetSubmodelElementValueById(System.String,System.String)">
<summary>
Retrieves the value of a specific Submodel-Element from the Submodel
</summary>
@@ -578,7 +578,7 @@
<response code="404">Submodel / Submodel-Element not found</response>
<response code="405">Method not allowed</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_PutSubmodelElementValueByIdShort(System.String,System.String,System.Object)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_PutSubmodelElementValueById(System.String,System.String,System.Object)">
<summary>
Updates the Submodel-Element's value
</summary>
@@ -590,7 +590,7 @@
<response code="404">Submodel / Submodel-Element not found</response>
<response code="405">Method not allowed</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_DeleteSubmodelElementByIdShort(System.String,System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_DeleteSubmodelElementById(System.String,System.String)">
<summary>
Deletes a specific Submodel-Element from the Submodel
</summary>
@@ -600,7 +600,7 @@
<response code="204">Submodel-Element deleted successfully</response>
<response code="404">Submodel / Submodel-Element not found</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_InvokeOperationByIdShort(System.String,System.String,BaSyx.Models.Communication.InvocationRequest,System.Boolean)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_InvokeOperationById(System.String,System.String,BaSyx.Models.Communication.InvocationRequest,System.Boolean)">
<summary>
Invokes a specific operation from the Submodel synchronously or asynchronously
</summary>
@@ -613,7 +613,7 @@
<response code="400">Bad Request</response>
<response code="404">Submodel / Method handler not found</response>
</member>
- <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetInvocationResultByIdShort(System.String,System.String,System.String)">
+ <member name="M:BaSyx.API.Http.Controllers.SubmodelRepositoryController.SubmodelRepo_GetInvocationResultById(System.String,System.String,System.String)">
<summary>
Retrieves the result of an asynchronously started operation
</summary>
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShell.cshtml b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShell.cshtml
index 34424c6..2c10e45 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShell.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShell.cshtml
@@ -8,6 +8,14 @@
@{
IAssetAdministrationShellServiceProvider sp = Model.ServiceProvider;
+
+ IEnumerable<ISubmodelServiceProvider> submodelServiceProviders = null;
+ var retrievedSubmodelServiceProvider = sp.SubmodelRegistry.GetSubmodelServiceProviders();
+ if (retrievedSubmodelServiceProvider.Success && retrievedSubmodelServiceProvider.Entity != null)
+ {
+ submodelServiceProviders = retrievedSubmodelServiceProvider.Entity;
+ }
+
IAssetAdministrationShell aas = sp.GetBinding();
IHostingEnvironment hostingEnvironment = Model.HostingEnvironment;
ServerSettings settings = Model.Settings;
@@ -30,10 +38,11 @@
@await Html.PartialAsync("_Asset", aas.Asset)
-@if (aas.Submodels.Count() > 0)
+@if (submodelServiceProviders?.Count() > 0)
{
- foreach (var submodel in aas.Submodels)
+ foreach (var submodelServiceProvider in submodelServiceProviders)
{
+ ISubmodel submodel = submodelServiceProvider.GetBinding();
@await Html.PartialAsync("_Submodel", submodel)
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRegistry.cshtml b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRegistry.cshtml
index a1bddd6..54e1736 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRegistry.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRegistry.cshtml
@@ -12,7 +12,14 @@
@{
IAssetAdministrationShellRegistry registry = Model.ServiceProvider;
- IElementContainer<IAssetAdministrationShellDescriptor> shells = registry.RetrieveAllAssetAdministrationShellRegistrations().Entity;
+
+ IElementContainer<IAssetAdministrationShellDescriptor> shellsDescriptors = null;
+ var retrievedShellDescriptors = registry.RetrieveAllAssetAdministrationShellRegistrations();
+ if (retrievedShellDescriptors.Success && retrievedShellDescriptors.Entity != null)
+ {
+ shellsDescriptors = retrievedShellDescriptors.Entity;
+ }
+
IHostingEnvironment hostingEnvironment = Model.HostingEnvironment;
ServerSettings settings = Model.Settings;
string pathToCompanyLogo = settings.Miscellaneous.TryGetValue("CompanyLogo", out string path) ? path : string.Empty;
@@ -48,9 +55,9 @@
<p class="lead">Generic UI to discover the Asset Administration Shell Registry</p>
</div>
-@if (shells?.Count() > 0)
+@if (shellsDescriptors?.Count() > 0)
{
- foreach (var aas in shells)
+ foreach (var aas in shellsDescriptors)
{
<div class="card border-dark mb-3">
<div class="card-header bg-dark">
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRepository.cshtml b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRepository.cshtml
index 9b90c35..d56e550 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRepository.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/AssetAdministrationShellRepository.cshtml
@@ -1,6 +1,7 @@
@page
@model BaSyx.Common.UI.Pages.AssetAdministrationShellRepositoryModel
@using BaSyx.API.Components;
+@using BaSyx.Models.Core.AssetAdministrationShell.Generics;
@using BaSyx.Utils.Settings.Types;
@using Microsoft.AspNetCore.Hosting;
@using System.Security.Cryptography;
@@ -9,6 +10,14 @@
@{
IAssetAdministrationShellRepositoryServiceProvider sp = Model.ServiceProvider;
+
+ IEnumerable<IAssetAdministrationShellServiceProvider> shellServiceProviders = null;
+ var retrievedShellServiceProviders = sp.GetAssetAdministrationShellServiceProviders();
+ if (retrievedShellServiceProviders.Success && retrievedShellServiceProviders.Entity != null)
+ {
+ shellServiceProviders = retrievedShellServiceProviders.Entity;
+ }
+
IHostingEnvironment hostingEnvironment = Model.HostingEnvironment;
ServerSettings settings = Model.Settings;
string pathToCompanyLogo = settings.Miscellaneous.TryGetValue("CompanyLogo", out string path) ? path : string.Empty;
@@ -16,7 +25,7 @@
ViewData["Title"] = "Asset Administration Shell Repository";
ViewData["ApiRoot"] = "/shells";
ViewData["CompanyLogo"] = pathToCompanyLogo;
- ViewData["ApiType"] = "AssetAdministrationShellRepository";
+ ViewData["ApiType"] = "AssetAdministrationShellRepository";
}
@functions
@@ -45,10 +54,11 @@
</div>
-@if (sp.AssetAdministrationShells?.Count() > 0)
+@if (shellServiceProviders?.Count() > 0)
{
- foreach (var aas in sp.AssetAdministrationShells)
+ foreach (var shellServiceProvider in shellServiceProviders)
{
+ IAssetAdministrationShell aas = shellServiceProvider.GetBinding();
<div class="card border-dark mb-3">
<div class="card-header bg-dark">
<h4>
@@ -64,10 +74,20 @@
<div class="card-body">
@await Html.PartialAsync("_Asset", aas.Asset)
- @if (aas.Submodels.Count() > 0)
- {
- foreach (var submodel in aas.Submodels)
+ @{
+ IEnumerable<ISubmodelServiceProvider> submodelServiceProviders = null;
+ var retrievedSubmodelServiceProvider = shellServiceProvider.SubmodelRegistry.GetSubmodelServiceProviders();
+ if (retrievedSubmodelServiceProvider.Success && retrievedSubmodelServiceProvider.Entity != null)
{
+ submodelServiceProviders = retrievedSubmodelServiceProvider.Entity;
+ }
+ }
+
+ @if (submodelServiceProviders?.Count() > 0)
+ {
+ foreach (var submodelServiceProvider in submodelServiceProviders)
+ {
+ ISubmodel submodel = submodelServiceProvider.GetBinding();
@await Html.PartialAsync("_Submodel", submodel, new ViewDataDictionary(ViewData) { {"aasId", aas.IdShort} })
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/Shared/_Submodel.cshtml b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/Shared/_Submodel.cshtml
index 208f23d..9013583 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/Shared/_Submodel.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/Shared/_Submodel.cshtml
@@ -19,6 +19,7 @@
string inputId = GetHashString(requestPath + ";Input");
string retrieveButtonId = GetHashString(requestPath + ";Retrieve");
string updateButtonId = GetHashString(requestPath + ";Update");
+ string clearButtonId = GetHashString(requestPath + ";Clear");
<div class="card-footer">
<div class="row align-items-center">
<div class="col-sm-8">
@@ -27,6 +28,7 @@
<div class="col-sm-4">
<button onclick="@("GetPropertyValue('" + requestPath + "', '" + @inputId + "')")" id="@retrieveButtonId" type="button" class="btn btn-outline-danger">Retrieve</button>
<button onclick="@("SetPropertyValue('" + requestPath + "', '" + @inputId + "', $('#" + @inputId + "').val() )")" id="@updateButtonId" type="button" class="btn btn-outline-success">Update</button>
+ <button onclick="@("$('#" + @inputId + "').val('')")" id="@clearButtonId" type="button" class="btn btn-outline-primary">Clear</button>
</div>
</div>
</div>
@@ -99,9 +101,9 @@
</ul>
}
- <div class="card-footer">
- <button onclick="@("ExecuteOperation('" + requestPath +"', '" + hashedRequestPath + "')")" type="button" class="btn btn-success">Execute</button>
- </div>
+ <div class="card-footer">
+ <button onclick="@("ExecuteOperation('" + requestPath +"', '" + hashedRequestPath + "')")" type="button" class="btn btn-success">Execute</button>
+ </div>
}
else if (submodelElementContainer.HasChildren())
{
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/SubmodelRepository.cshtml b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/SubmodelRepository.cshtml
index 50907b0..34925f3 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/SubmodelRepository.cshtml
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/Pages/SubmodelRepository.cshtml
@@ -1,12 +1,21 @@
@page
@model BaSyx.Common.UI.Pages.SubmodelRepositoryModel
@using BaSyx.API.Components;
+@using BaSyx.Models.Core.AssetAdministrationShell.Generics;
@using BaSyx.Utils.Settings.Types;
@using Microsoft.AspNetCore.Hosting;
@{
ISubmodelRepositoryServiceProvider sp = Model.ServiceProvider;
+
+ IEnumerable<ISubmodelServiceProvider> submodelServiceProviders = null;
+ var retrievedSubmodelServiceProvider = sp.GetSubmodelServiceProviders();
+ if (retrievedSubmodelServiceProvider.Success && retrievedSubmodelServiceProvider.Entity != null)
+ {
+ submodelServiceProviders = retrievedSubmodelServiceProvider.Entity;
+ }
+
IHostingEnvironment hostingEnvironment = Model.HostingEnvironment;
ServerSettings settings = Model.Settings;
string pathToCompanyLogo = settings.Miscellaneous.TryGetValue("CompanyLogo", out string path) ? path : string.Empty;
@@ -24,10 +33,11 @@
<p class="lead">Generic UI to discover the Submodel Repository</p>
</div>
-@if (sp.Submodels?.Count() > 0)
+@if (submodelServiceProviders?.Count() > 0)
{
- foreach (var submodel in sp.Submodels)
+ foreach (var submodelServiceProvider in submodelServiceProviders)
{
+ ISubmodel submodel = submodelServiceProvider.GetBinding();
@await Html.PartialAsync("_Submodel", submodel)
}
}
diff --git a/sdks/dotnet/basyx-components/BaSyx.Common.UI/resources/images/basyxlogo.png b/sdks/dotnet/basyx-components/BaSyx.Common.UI/resources/images/basyxlogo.png
index 2e9395f..3ec0ec1 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Common.UI/resources/images/basyxlogo.png
+++ b/sdks/dotnet/basyx-components/BaSyx.Common.UI/resources/images/basyxlogo.png
Binary files differ
diff --git a/sdks/dotnet/basyx-components/BaSyx.Components.Common/ServerApplication.cs b/sdks/dotnet/basyx-components/BaSyx.Components.Common/ServerApplication.cs
index fc59b08..bfcc05d 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Components.Common/ServerApplication.cs
+++ b/sdks/dotnet/basyx-components/BaSyx.Components.Common/ServerApplication.cs
@@ -359,7 +359,7 @@
if (requestPath.Contains("submodelElements/"))
{
Match valueMatch = Regex.Match(requestPath, "(?<=submodelElements/)(.*)(?=/value|/invoke|/invocationList)");
- if(valueMatch.Success)
+ if(valueMatch.Success && !string.IsNullOrEmpty(valueMatch.Value))
{
string elementPath = HttpUtility.UrlEncode(valueMatch.Value);
requestPath = requestPath.Replace(valueMatch.Value, elementPath);
@@ -368,7 +368,7 @@
else
{
Match baseMatch = Regex.Match(requestPath, "(?<=submodelElements/)(.*)");
- if(baseMatch.Success)
+ if(baseMatch.Success && !string.IsNullOrEmpty(baseMatch.Value))
{
string elementPath = HttpUtility.UrlEncode(baseMatch.Value);
requestPath = requestPath.Replace(baseMatch.Value, elementPath);
diff --git a/sdks/dotnet/basyx-components/BaSyx.Components.sln b/sdks/dotnet/basyx-components/BaSyx.Components.sln
index 89f5b37..c90fbd7 100644
--- a/sdks/dotnet/basyx-components/BaSyx.Components.sln
+++ b/sdks/dotnet/basyx-components/BaSyx.Components.sln
@@ -53,6 +53,10 @@
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaSyx.Components.Common.Abstractions", "BaSyx.Components.Common.Abstractions\BaSyx.Components.Common.Abstractions.csproj", "{1471A481-AD5B-4641-B953-11FE678A0844}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAssetAdministrationShell", "..\basyx-examples\SimpleAssetAdministrationShell\SimpleAssetAdministrationShell.csproj", "{163CFD71-A9E4-423A-B632-38907F0B5A81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiAssetAdministrationShell", "..\basyx-examples\MultiAssetAdministrationShell\MultiAssetAdministrationShell.csproj", "{60EE5F38-B4FC-4424-A6DE-34B621FEA758}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -131,6 +135,14 @@
{1471A481-AD5B-4641-B953-11FE678A0844}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1471A481-AD5B-4641-B953-11FE678A0844}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1471A481-AD5B-4641-B953-11FE678A0844}.Release|Any CPU.Build.0 = Release|Any CPU
+ {163CFD71-A9E4-423A-B632-38907F0B5A81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {163CFD71-A9E4-423A-B632-38907F0B5A81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {163CFD71-A9E4-423A-B632-38907F0B5A81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {163CFD71-A9E4-423A-B632-38907F0B5A81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {60EE5F38-B4FC-4424-A6DE-34B621FEA758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {60EE5F38-B4FC-4424-A6DE-34B621FEA758}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {60EE5F38-B4FC-4424-A6DE-34B621FEA758}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {60EE5F38-B4FC-4424-A6DE-34B621FEA758}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -154,6 +166,8 @@
{CB4CBEF9-F654-4FBD-9DFB-2340721F24D7} = {12CD4BF1-B0A6-4DBD-AFB6-6F232C92AAFA}
{415242FE-C464-48DB-96AD-FF4E02500AB7} = {12CD4BF1-B0A6-4DBD-AFB6-6F232C92AAFA}
{1471A481-AD5B-4641-B953-11FE678A0844} = {12CD4BF1-B0A6-4DBD-AFB6-6F232C92AAFA}
+ {163CFD71-A9E4-423A-B632-38907F0B5A81} = {EB38D1D3-2539-4EA3-9FA9-B91487278FC2}
+ {60EE5F38-B4FC-4424-A6DE-34B621FEA758} = {EB38D1D3-2539-4EA3-9FA9-B91487278FC2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8DC440E9-3A4D-4D67-B741-72B8F15EB8C7}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellServiceProviderRegistry.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellServiceProviderRegistry.cs
new file mode 100644
index 0000000..610d790
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellServiceProviderRegistry.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.Utils.ResultHandling;
+using System.Collections.Generic;
+
+namespace BaSyx.API.Components
+{
+ public interface IAssetAdministrationShellServiceProviderRegistry
+ {
+ IResult<IAssetAdministrationShellDescriptor> RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider);
+ IResult UnregisterAssetAdministrationShellServiceProvider(string id);
+ IResult<IAssetAdministrationShellServiceProvider> GetAssetAdministrationShellServiceProvider(string id);
+ IResult<IEnumerable<IAssetAdministrationShellServiceProvider>> GetAssetAdministrationShellServiceProviders();
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellRepositoryServiceProvider.cs
similarity index 62%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellRepositoryServiceProvider.cs
index 68c4518..ec20ab6 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellRepositoryServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellRepositoryServiceProvider.cs
@@ -54,18 +54,21 @@
{
foreach (var assetAdministrationShell in assetAdministrationShells)
{
- RegisterAssetAdministrationShellServiceProvider(assetAdministrationShell.IdShort, assetAdministrationShell.CreateServiceProvider(true));
+ RegisterAssetAdministrationShellServiceProvider(assetAdministrationShell.Identification.Id, assetAdministrationShell.CreateServiceProvider(true));
}
ServiceDescriptor = ServiceDescriptor ?? new AssetAdministrationShellRepositoryDescriptor(assetAdministrationShells, null);
}
public IEnumerable<IAssetAdministrationShell> GetBinding()
{
- IEnumerable<IAssetAdministrationShellServiceProvider> serviceProviders = GetAssetAdministrationShellServiceProviders();
List<IAssetAdministrationShell> assetAdministrationShells = new List<IAssetAdministrationShell>();
- foreach (var serviceProvider in serviceProviders)
+ var retrievedShellServiceProviders = GetAssetAdministrationShellServiceProviders();
+ if (retrievedShellServiceProviders.TryGetEntity(out IEnumerable<IAssetAdministrationShellServiceProvider> serviceProviders))
{
- IAssetAdministrationShell binding = serviceProvider.GetBinding();
- assetAdministrationShells.Add(binding);
+ foreach (var serviceProvider in serviceProviders)
+ {
+ IAssetAdministrationShell binding = serviceProvider.GetBinding();
+ assetAdministrationShells.Add(binding);
+ }
}
return assetAdministrationShells;
}
@@ -74,10 +77,13 @@
{
if (aas == null)
return new Result<IAssetAdministrationShell>(new ArgumentNullException(nameof(aas)));
- RegisterAssetAdministrationShellServiceProvider(aas.IdShort, aas.CreateServiceProvider(true));
+
+ var registered = RegisterAssetAdministrationShellServiceProvider(aas.Identification.Id, aas.CreateServiceProvider(true));
+ if (!registered.Success)
+ return new Result<IAssetAdministrationShell>(registered);
- IAssetAdministrationShellServiceProvider serviceProvider = GetAssetAdministrationShellServiceProvider(aas.IdShort);
- if (serviceProvider != null && serviceProvider.GetBinding() != null)
+ var retrievedShellServiceProvider = GetAssetAdministrationShellServiceProvider(aas.Identification.Id);
+ if (retrievedShellServiceProvider.TryGetEntity(out IAssetAdministrationShellServiceProvider serviceProvider))
return new Result<IAssetAdministrationShell>(true, serviceProvider.GetBinding());
else
return new Result<IAssetAdministrationShell>(false, new Message(MessageType.Error, "Could not retrieve Asset Administration Shell Service Provider"));
@@ -87,39 +93,51 @@
{
if (string.IsNullOrEmpty(aasId))
return new Result<IAssetAdministrationShell>(new ArgumentNullException(nameof(aasId)));
- UnregisterAssetAdministrationShellServiceProvider(aasId);
- return new Result(true);
+
+ return UnregisterAssetAdministrationShellServiceProvider(aasId);
}
- public IAssetAdministrationShellServiceProvider GetAssetAdministrationShellServiceProvider(string id)
+ public IResult<IAssetAdministrationShellServiceProvider> GetAssetAdministrationShellServiceProvider(string id)
{
if (AssetAdministrationShellServiceProviders.TryGetValue(id, out IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider))
- return assetAdministrationShellServiceProvider;
+ return new Result<IAssetAdministrationShellServiceProvider>(true, assetAdministrationShellServiceProvider);
else
- return null;
+ return new Result<IAssetAdministrationShellServiceProvider>(false, new NotFoundMessage(id));
}
- public IEnumerable<IAssetAdministrationShellServiceProvider> GetAssetAdministrationShellServiceProviders()
+ public IResult<IEnumerable<IAssetAdministrationShellServiceProvider>> GetAssetAdministrationShellServiceProviders()
{
- return AssetAdministrationShellServiceProviders?.Values.ToList();
+ if (AssetAdministrationShellServiceProviders.Values == null)
+ return new Result<IEnumerable<IAssetAdministrationShellServiceProvider>>(false, new NotFoundMessage("Asset AdministrationShell Service Providers"));
+
+ return new Result<IEnumerable<IAssetAdministrationShellServiceProvider>>(true, AssetAdministrationShellServiceProviders.Values?.ToList());
}
- public void RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider)
+ public IResult<IAssetAdministrationShellDescriptor> RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider)
{
- if (!AssetAdministrationShellServiceProviders.ContainsKey(id))
+ if (AssetAdministrationShellServiceProviders.ContainsKey(id))
+ AssetAdministrationShellServiceProviders[id] = assetAdministrationShellServiceProvider;
+ else
AssetAdministrationShellServiceProviders.Add(id, assetAdministrationShellServiceProvider);
+
+ return new Result<IAssetAdministrationShellDescriptor>(true, assetAdministrationShellServiceProvider.ServiceDescriptor);
}
- public void UnregisterAssetAdministrationShellServiceProvider(string id)
+ public IResult UnregisterAssetAdministrationShellServiceProvider(string id)
{
- if (!AssetAdministrationShellServiceProviders.ContainsKey(id))
+ if (AssetAdministrationShellServiceProviders.ContainsKey(id))
+ {
AssetAdministrationShellServiceProviders.Remove(id);
+ return new Result(true);
+ }
+ else
+ return new Result(false, new NotFoundMessage(id));
}
public IResult<IAssetAdministrationShell> RetrieveAssetAdministrationShell(string aasId)
{
- IAssetAdministrationShellServiceProvider serviceProvider = GetAssetAdministrationShellServiceProvider(aasId);
- if(serviceProvider != null && serviceProvider.GetBinding() != null)
+ var retrievedShellServiceProvider = GetAssetAdministrationShellServiceProvider(aasId);
+ if(retrievedShellServiceProvider.TryGetEntity(out IAssetAdministrationShellServiceProvider serviceProvider))
{
IAssetAdministrationShell binding = serviceProvider.GetBinding();
return new Result<IAssetAdministrationShell>(true, binding);
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellServiceProvider.cs
similarity index 91%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellServiceProvider.cs
index 57a16fd..e8e9795 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/AssetAdministrationShellServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/AssetAdministrationShellServiceProvider.cs
@@ -33,7 +33,7 @@
IAssetAdministrationShell assetAdministrationShell = BuildAssetAdministrationShell();
BindTo(assetAdministrationShell);
}
- return _assetAdministrationShell;
+ return GetBinding();
}
}
/// <summary>
@@ -95,7 +95,14 @@
}
public virtual IAssetAdministrationShell GetBinding()
{
- return AssetAdministrationShell;
+ IAssetAdministrationShell shell = _assetAdministrationShell;
+
+ foreach (var submodelServiceProvider in SubmodelServiceProviders)
+ {
+ ISubmodel submodel = submodelServiceProvider.Value.GetBinding();
+ shell.Submodels.CreateOrUpdate(submodel.IdShort, submodel);
+ }
+ return shell;
}
public virtual void UseDefaultSubmodelServiceProvider()
@@ -129,7 +136,7 @@
if (SubmodelServiceProviders.TryGetValue(submodelId, out ISubmodelServiceProvider submodelServiceProvider))
return new Result<ISubmodelServiceProvider>(true, submodelServiceProvider);
else
- return new Result<ISubmodelServiceProvider>(false, new NotFoundMessage());
+ return new Result<ISubmodelServiceProvider>(false, new NotFoundMessage(submodelId));
}
public virtual IResult UnregisterSubmodelServiceProvider(string submodelId)
@@ -137,10 +144,10 @@
if (SubmodelServiceProviders.ContainsKey(submodelId))
{
SubmodelServiceProviders.Remove(submodelId);
- return new Result<ISubmodelServiceProvider>(true);
+ return new Result(true);
}
else
- return new Result<ISubmodelServiceProvider>(false, new NotFoundMessage());
+ return new Result(false, new NotFoundMessage(submodelId));
}
}
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/DistributedSubmodelServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/DistributedSubmodelServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/DistributedSubmodelServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/DistributedSubmodelServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IAssetAdministrationShellRepositoryServiceProvider.cs
similarity index 63%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IAssetAdministrationShellRepositoryServiceProvider.cs
index b522197..39f3818 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellRepositoryServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IAssetAdministrationShellRepositoryServiceProvider.cs
@@ -14,11 +14,6 @@
namespace BaSyx.API.Components
{
- public interface IAssetAdministrationShellRepositoryServiceProvider : IServiceProvider<IEnumerable<IAssetAdministrationShell>, IAssetAdministrationShellRepositoryDescriptor>, IAssetAdministrationShellRepository
- {
- IEnumerable<IAssetAdministrationShell> AssetAdministrationShells { get; }
- void RegisterAssetAdministrationShellServiceProvider(string id, IAssetAdministrationShellServiceProvider assetAdministrationShellServiceProvider);
- IAssetAdministrationShellServiceProvider GetAssetAdministrationShellServiceProvider(string id);
- IEnumerable<IAssetAdministrationShellServiceProvider> GetAssetAdministrationShellServiceProviders();
- }
+ public interface IAssetAdministrationShellRepositoryServiceProvider : IServiceProvider<IEnumerable<IAssetAdministrationShell>, IAssetAdministrationShellRepositoryDescriptor>, IAssetAdministrationShellRepository, IAssetAdministrationShellServiceProviderRegistry
+ { }
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IAssetAdministrationShellServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/IAssetAdministrationShellServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IAssetAdministrationShellServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/IServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/IServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/IServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/ISubmodelRepositoryServiceProvider.cs
similarity index 69%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/ISubmodelRepositoryServiceProvider.cs
index 665793e..18f72b5 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelRepositoryServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/ISubmodelRepositoryServiceProvider.cs
@@ -14,11 +14,6 @@
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();
- }
+ public interface ISubmodelRepositoryServiceProvider : IServiceProvider<IEnumerable<ISubmodel>, ISubmodelRepositoryDescriptor>, ISubmodelRepository, ISubmodelServiceProviderRegistry
+ { }
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/ISubmodelServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/ISubmodelServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/ISubmodelServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/InternalAssetAdministationShellServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/InternalAssetAdministationShellServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/InternalAssetAdministationShellServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/InternalAssetAdministationShellServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/InternalSubmodelServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/InternalSubmodelServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/InternalSubmodelServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/InternalSubmodelServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/SubmodelRepositoryServiceProvider.cs
similarity index 62%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/SubmodelRepositoryServiceProvider.cs
index b63ed78..04c4363 100644
--- a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelRepositoryServiceProvider.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/SubmodelRepositoryServiceProvider.cs
@@ -54,18 +54,21 @@
{
foreach (var submodel in submodels)
{
- RegisterSubmodelServiceProvider(submodel.IdShort, submodel.CreateServiceProvider());
+ RegisterSubmodelServiceProvider(submodel.Identification.Id, 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)
+ var retrievedSubmodelServiceProviders = GetSubmodelServiceProviders();
+ if (retrievedSubmodelServiceProviders.TryGetEntity(out IEnumerable<ISubmodelServiceProvider> serviceProviders))
{
- ISubmodel binding = serviceProvider.GetBinding();
- submodels.Add(binding);
+ foreach (var serviceProvider in serviceProviders)
+ {
+ ISubmodel binding = serviceProvider.GetBinding();
+ submodels.Add(binding);
+ }
}
return submodels;
}
@@ -74,10 +77,13 @@
{
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)
+ var registered = RegisterSubmodelServiceProvider(submodel.Identification.Id, submodel.CreateServiceProvider());
+ if (!registered.Success)
+ return new Result<ISubmodel>(registered);
+
+ var retrievedSubmodelServiceProvider = GetSubmodelServiceProvider(submodel.Identification.Id);
+ if (retrievedSubmodelServiceProvider.TryGetEntity(out ISubmodelServiceProvider serviceProvider))
return new Result<ISubmodel>(true, serviceProvider.GetBinding());
else
return new Result<ISubmodel>(false, new Message(MessageType.Error, "Could not retrieve Submodel Service Provider"));
@@ -87,39 +93,50 @@
{
if (string.IsNullOrEmpty(submodelId))
return new Result<ISubmodel>(new ArgumentNullException(nameof(submodelId)));
- UnregisterSubmodelServiceProvider(submodelId);
- return new Result(true);
+ return UnregisterSubmodelServiceProvider(submodelId);
}
- public ISubmodelServiceProvider GetSubmodelServiceProvider(string id)
+ public IResult<ISubmodelServiceProvider> GetSubmodelServiceProvider(string id)
{
if (SubmodelServiceProviders.TryGetValue(id, out ISubmodelServiceProvider submodelServiceProvider))
- return submodelServiceProvider;
+ return new Result<ISubmodelServiceProvider>(true, submodelServiceProvider);
else
- return null;
+ return new Result<ISubmodelServiceProvider>(false, new NotFoundMessage(id));
}
- public IEnumerable<ISubmodelServiceProvider> GetSubmodelServiceProviders()
+ public IResult<IEnumerable<ISubmodelServiceProvider>> GetSubmodelServiceProviders()
{
- return SubmodelServiceProviders?.Values.ToList();
+ if (SubmodelServiceProviders.Values == null)
+ return new Result<IEnumerable<ISubmodelServiceProvider>>(false, new NotFoundMessage("Submodel Service Providers"));
+
+ return new Result<IEnumerable<ISubmodelServiceProvider>>(true, SubmodelServiceProviders.Values?.ToList());
}
- public void RegisterSubmodelServiceProvider(string id, ISubmodelServiceProvider submodelServiceProvider)
+ public IResult<ISubmodelDescriptor> RegisterSubmodelServiceProvider(string id, ISubmodelServiceProvider submodelServiceProvider)
{
- if (!SubmodelServiceProviders.ContainsKey(id))
+ if (SubmodelServiceProviders.ContainsKey(id))
+ SubmodelServiceProviders[id] = submodelServiceProvider;
+ else
SubmodelServiceProviders.Add(id, submodelServiceProvider);
+
+ return new Result<ISubmodelDescriptor>(true, submodelServiceProvider.ServiceDescriptor);
}
- public void UnregisterSubmodelServiceProvider(string id)
+ public IResult UnregisterSubmodelServiceProvider(string id)
{
- if (!SubmodelServiceProviders.ContainsKey(id))
+ if (SubmodelServiceProviders.ContainsKey(id))
+ {
SubmodelServiceProviders.Remove(id);
+ return new Result(true);
+ }
+ else
+ return new Result(false, new NotFoundMessage(id));
}
public IResult<ISubmodel> RetrieveSubmodel(string submodelId)
{
- ISubmodelServiceProvider serviceProvider = GetSubmodelServiceProvider(submodelId);
- if(serviceProvider != null && serviceProvider.GetBinding() != null)
+ var retrievedSubmodelServiceProvider = GetSubmodelServiceProvider(submodelId);
+ if(retrievedSubmodelServiceProvider.TryGetEntity(out ISubmodelServiceProvider serviceProvider))
{
ISubmodel binding = serviceProvider.GetBinding();
return new Result<ISubmodel>(true, binding);
diff --git a/sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs b/sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/SubmodelServiceProvider.cs
similarity index 100%
rename from sdks/dotnet/basyx-core/BaSyx.API/Components/SubmodelServiceProvider.cs
rename to sdks/dotnet/basyx-core/BaSyx.API/Components/ServiceProvider/SubmodelServiceProvider.cs
diff --git a/sdks/dotnet/basyx-core/BaSyx.Core.Tests/AttributeTest.cs b/sdks/dotnet/basyx-core/BaSyx.Core.Tests/AttributeTest.cs
index 79a643c..da1847d 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Core.Tests/AttributeTest.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Core.Tests/AttributeTest.cs
@@ -4,6 +4,7 @@
using BaSyx.Models.Core.Attributes;
using BaSyx.Models.Core.Common;
using BaSyx.Models.Extensions;
+using BaSyx.Models.Extensions.Semantics.DataSpecifications;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
@@ -41,9 +42,20 @@
public class TestSubClass
{
[Property("TestSubIntProperty", DataObjectTypes.Int32, "urn:semantic:id:testSubIntProperty:1.0.0", KeyElements.Property, KeyType.IRI, Category = "VARIABLE")]
+ [DataSpecificationIEC61360("0173-ABC123-00#", KeyType.IRDI,
+ DataType = DataTypeIEC61360.INTEGER,
+ PreferredName_DE = "Test Integer Variable",
+ PreferredName_EN = "Test Integer Variable",
+ ShortName_DE = "testSubIntProperty",
+ ShortName_EN = "testSubIntProperty",
+ Definition_DE = "Eine Variable als Integer innerhalb einer SubmodelModelElementCollection",
+ Definition_EN = "A variable as integer within a SubmodelElementCollection",
+ Unit = "V",
+ UnitId = "0173-CCDAB52-004",
+ UnitIdKeyType = KeyType.IRDI)]
public int TestSubIntProperty { get; set; }
- [Property("TestSubDataTimeProperty", DataObjectTypes.DateTime, "urn:semantic:id:testSubDataTimeProperty:1.0.0", KeyElements.Property, KeyType.IRI, Category = "VARIABLE")]
+ [Property("TestSubDataTimeProperty", DataObjectTypes.DateTime, "urn:semantic:id:testSubDataTimeProperty:1.0.0", KeyElements.Property, KeyType.IRI, Category = "VARIABLE")]
public DateTime TestSubDataTimeProperty { get; set; } = DateTime.Now;
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Core/Attributes/DataSpecificationIEC61360Attribute.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Core/Attributes/DataSpecificationIEC61360Attribute.cs
new file mode 100644
index 0000000..fd728d5
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Core/Attributes/DataSpecificationIEC61360Attribute.cs
@@ -0,0 +1,64 @@
+/*******************************************************************************
+* 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.Identification;
+using BaSyx.Models.Extensions.Semantics.DataSpecifications;
+using System;
+
+namespace BaSyx.Models.Core.Attributes
+{
+ [AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = true)]
+ public sealed class DataSpecificationIEC61360Attribute : Attribute
+ {
+ public Identifier Identification { get; }
+ public DataSpecificationIEC61360Content Content { get; }
+
+ public string PreferredName_DE { get => Content.PreferredName["de"]; set => Content.PreferredName.AddLangString("de", value); }
+ public string PreferredName_EN { get => Content.PreferredName["en"]; set => Content.PreferredName.AddLangString("en", value); }
+
+ public string Definition_DE { get => Content.Definition["de"]; set => Content.Definition.AddLangString("de", value); }
+ public string Definition_EN { get => Content.Definition["en"]; set => Content.Definition.AddLangString("en", value); }
+
+ public string ShortName_DE { get => Content.ShortName["de"]; set => Content.ShortName.AddLangString("de", value); }
+ public string ShortName_EN { get => Content.ShortName["en"]; set => Content.ShortName.AddLangString("en", value); }
+
+ public DataTypeIEC61360 DataType { get => Content.DataType; set => Content.DataType = value; }
+
+ public string SourceOfDefinition { get => Content.SourceOfDefinition; set => Content.SourceOfDefinition = value; }
+
+ public string Symbol { get => Content.Symbol; set => Content.Symbol = value; }
+
+ public string Unit { get => Content.Unit; set => Content.Unit = value; }
+
+ public KeyType UnitIdKeyType { get; set; }
+
+ public string UnitId {
+ get => Content.UnitId.ToStandardizedString();
+ set => Content.UnitId = new Reference(new GlobalKey(KeyElements.GlobalReference, UnitIdKeyType, value)); }
+
+ public string ValueFormat { get => Content.ValueFormat; set => Content.ValueFormat = value; }
+
+ public object Value { get => Content.Value; set => Content.Value = value; }
+
+ public KeyType ValueIdKeyType { get; set; }
+
+ public string ValueId
+ {
+ get => Content.ValueId.ToStandardizedString();
+ set => Content.ValueId = new Reference(new GlobalKey(KeyElements.GlobalReference, ValueIdKeyType, value));
+ }
+
+ public DataSpecificationIEC61360Attribute(string id, KeyType idType)
+ {
+ Identification = new Identifier(id, idType);
+ Content = new DataSpecificationIEC61360Content();
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/Semantics/DataSpecifications/DataSpecificationIEC61360.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/Semantics/DataSpecifications/DataSpecificationIEC61360.cs
index 312b8f7..15aff71 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/Semantics/DataSpecifications/DataSpecificationIEC61360.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/Semantics/DataSpecifications/DataSpecificationIEC61360.cs
@@ -60,6 +60,15 @@
public object Value { get; set; }
[DataMember(EmitDefaultValue = false, IsRequired = false, Name = "levelTypes")]
public List<LevelType> LevelTypes { get; set; }
+
+ public DataSpecificationIEC61360Content()
+ {
+ PreferredName = new LangStringSet();
+ Definition = new LangStringSet();
+ ShortName = new LangStringSet();
+ ValueList = new List<ValueReferencePair>();
+ LevelTypes = new List<LevelType>();
+ }
}
[DataContract]
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/SubmodelElementExtensions.cs b/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/SubmodelElementExtensions.cs
index bb9aff2..e5ff3be 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/SubmodelElementExtensions.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models/Extensions/SubmodelElementExtensions.cs
@@ -11,8 +11,10 @@
using BaSyx.Models.Core.AssetAdministrationShell.Generics;
using BaSyx.Models.Core.AssetAdministrationShell.Identification;
using BaSyx.Models.Core.AssetAdministrationShell.Implementations;
+using BaSyx.Models.Core.AssetAdministrationShell.Semantics;
using BaSyx.Models.Core.Attributes;
using BaSyx.Models.Core.Common;
+using BaSyx.Models.Extensions.Semantics.DataSpecifications;
using NLog;
using System;
using System.Collections;
@@ -161,6 +163,19 @@
if (!string.IsNullOrEmpty(idShort) && idShort != propertyInfo.Name)
se.IdShort = idShort;
+ if(Attribute.IsDefined(propertyInfo, typeof(DataSpecificationIEC61360Attribute)))
+ {
+ var specAttribute = Attribute.GetCustomAttribute(propertyInfo, typeof(DataSpecificationIEC61360Attribute)) as DataSpecificationIEC61360Attribute;
+ se.ConceptDescription = new ConceptDescription()
+ {
+ Identification = specAttribute.Identification,
+ EmbeddedDataSpecifications = new List<IEmbeddedDataSpecification>()
+ {
+ new DataSpecificationIEC61360(specAttribute.Content)
+ }
+ };
+ }
+
if (se is SubmodelElementCollection seCollection)
{
if (DataType.IsGenericList(propertyInfo.PropertyType) || DataType.IsArray(propertyInfo.PropertyType))
@@ -212,12 +227,27 @@
return null;
}
+ IConceptDescription conceptDescription = null;
+ if (Attribute.IsDefined(propertyInfo, typeof(DataSpecificationIEC61360Attribute)))
+ {
+ var specAttribute = Attribute.GetCustomAttribute(propertyInfo, typeof(DataSpecificationIEC61360Attribute)) as DataSpecificationIEC61360Attribute;
+ conceptDescription = new ConceptDescription()
+ {
+ Identification = specAttribute.Identification,
+ EmbeddedDataSpecifications = new List<IEmbeddedDataSpecification>()
+ {
+ new DataSpecificationIEC61360(specAttribute.Content)
+ }
+ };
+ }
+
if (DataType.IsSimpleType(propertyInfo.PropertyType))
{
Property smProp = new Property(idShort, dataType);
if (target != null && propertyInfo.CanRead)
smProp.Value = propertyInfo.GetValue(target);
-
+
+ smProp.ConceptDescription = conceptDescription;
return smProp;
}
else if (propertyInfo.PropertyType == typeof(DateTime))
@@ -226,16 +256,18 @@
if (target != null && propertyInfo.CanRead && propertyInfo.GetValue(target) is DateTime dateTime)
smProp.Value = dateTime;
+ smProp.ConceptDescription = conceptDescription;
return smProp;
}
else if (DataType.IsGenericList(propertyInfo.PropertyType) || DataType.IsArray(propertyInfo.PropertyType))
{
- ISubmodelElementCollection seCollection;
+ SubmodelElementCollection seCollection;
if (target != null && propertyInfo.CanRead && propertyInfo.GetValue(target) is IEnumerable enumerable)
- seCollection = enumerable.CreateSubmodelElementCollectionFromEnumerable(idShort, bindingFlags);
+ seCollection = (SubmodelElementCollection)enumerable.CreateSubmodelElementCollectionFromEnumerable(idShort, bindingFlags);
else
seCollection = new SubmodelElementCollection(idShort);
+ seCollection.ConceptDescription = conceptDescription;
return seCollection;
}
else
@@ -252,6 +284,8 @@
if (smElement != null)
smCollection.Value.Create(smElement);
}
+
+ smCollection.ConceptDescription = conceptDescription;
return smCollection;
}
}
diff --git a/sdks/dotnet/basyx-core/BaSyx.Utils/ResultHandling/ResultExtensions.cs b/sdks/dotnet/basyx-core/BaSyx.Utils/ResultHandling/ResultExtensions.cs
new file mode 100644
index 0000000..0cc2d0b
--- /dev/null
+++ b/sdks/dotnet/basyx-core/BaSyx.Utils/ResultHandling/ResultExtensions.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
+*******************************************************************************/
+namespace BaSyx.Utils.ResultHandling
+{
+ public static class ResultExtensions
+ {
+ public static bool TryGetEntity<T>(this IResult<T> result, out T entity)
+ {
+ if(result.Entity != null)
+ {
+ entity = result.GetEntity<T>();
+ return true;
+ }
+ else
+ {
+ entity = default;
+ return false;
+ }
+ }
+ }
+}
diff --git a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/MultiAssetAdministrationShell.csproj b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/MultiAssetAdministrationShell.csproj
index d694423..8e81848 100644
--- a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/MultiAssetAdministrationShell.csproj
+++ b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/MultiAssetAdministrationShell.csproj
@@ -15,9 +15,9 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="BaSyx.AAS.Server.Http" Version="1.0.0" />
- <PackageReference Include="BaSyx.Common.UI" Version="1.0.0" />
- <PackageReference Include="BaSyx.Common.UI.Swagger" Version="1.0.0" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.AAS.Server.Http\BaSyx.AAS.Server.Http.csproj" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.Common.UI.Swagger\BaSyx.Common.UI.Swagger.csproj" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.Common.UI\BaSyx.Common.UI.csproj" />
</ItemGroup>
diff --git a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
index 0470386..b000343 100644
--- a/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
+++ b/sdks/dotnet/basyx-examples/MultiAssetAdministrationShell/Program.cs
@@ -98,7 +98,7 @@
});
var aasServiceProvider = aas.CreateServiceProvider(true);
- repositoryService.RegisterAssetAdministrationShellServiceProvider(aas.IdShort, aasServiceProvider);
+ repositoryService.RegisterAssetAdministrationShellServiceProvider(aas.Identification.Id, aasServiceProvider);
}
List<HttpEndpoint> endpoints = server.Settings.ServerConfig.Hosting.Urls.ConvertAll(c => new HttpEndpoint(c.Replace("+", "127.0.0.1")));
diff --git a/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.csproj b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.csproj
index 9e027e4..4dd270b 100644
--- a/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.csproj
+++ b/sdks/dotnet/basyx-examples/SimpleAssetAdministrationShell/SimpleAssetAdministrationShell.csproj
@@ -15,10 +15,10 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="..\..\basyx-components\BaSyx.AAS.Server.Http\BaSyx.AAS.Server.Http.csproj" Version="1.0.0" />
- <PackageReference Include="..\..\basyx-components\BaSyx.Common.UI.Swagger\BaSyx.Common.UI.Swagger.csproj" Version="1.0.0" />
- <PackageReference Include="..\..\basyx-components\BaSyx.Common.UI\BaSyx.Common.UI.csproj" Version="1.0.0" />
- <PackageReference Include="..\..\basyx-components\BaSyx.Submodel.Server.Http\BaSyx.Submodel.Server.Http.csproj" Version="1.0.0" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.AAS.Server.Http\BaSyx.AAS.Server.Http.csproj" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.Common.UI.Swagger\BaSyx.Common.UI.Swagger.csproj" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.Common.UI\BaSyx.Common.UI.csproj" />
+ <ProjectReference Include="..\..\basyx-components\BaSyx.Submodel.Server.Http\BaSyx.Submodel.Server.Http.csproj" />
</ItemGroup>
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 98d8403..853243a 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 922db99..e5fb1ab 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 5b2cece..9b213b7 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 7f684de..5b9ae9d 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 a1e107b..d58cde6 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 1918e27..20c21b8 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 f0b9fb8..0873d30 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 41531dc..c741986 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 9330ea8..2d20fad 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 f38e4c9..c2b02a4 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.Common.UI.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.nupkg
index 71de77f..d9f7dd4 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.symbols.nupkg
index 540dd7f..5710c1c 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.1.0.0.symbols.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.nupkg
index ec7589a..66f2d6f 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.symbols.nupkg
index 1f6bb6f..8f70b0a 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Common.UI.Swagger.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 3f856fb..056a9c5 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 df2f08e..7ad4f1b 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.Components.Common.Abstractions.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.nupkg
index 3a3bd1a..20bb45e 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.nupkg
Binary files differ
diff --git a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.symbols.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.symbols.nupkg
index d191e0e..12aa870 100644
--- a/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.1.0.0.symbols.nupkg
+++ b/sdks/dotnet/basyx-packages/BaSyx.Components.Common.Abstractions.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 f93f7ec..10fe3aa 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 c6bb1de..d5556a6 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 779f30f..5a2b375 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 d82d5d6..91e0b71 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 0ac8e63..2083323 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 e4c520e..c4469e4 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 7b3b740..3abfe45 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 ea26433..c77338b 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 9f02673..75377bc 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 c085dc2..17244a4 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 409d1a8..cca9043 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 b06a1ea..9801dd0 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 7298914..f8e5635 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 604b7d8..265ca86 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 1464e74..acb39a6 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 ad3d44d..12abfc9 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.Utils.1.0.0.nupkg b/sdks/dotnet/basyx-packages/BaSyx.Utils.1.0.0.nupkg
index c78a791..b17ca54 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 48110ca..e567737 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 43ce0af..1603594 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 92b57b9..b287dc5 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 c882068..14aadcd 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 05958ed..0e3d2b2 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 09273ea..7652529 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 15090d4..2e89701 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