From 88978764622948a512f3fea484d7b284d9f5c6eb Mon Sep 17 00:00:00 2001 From: martaf Date: Wed, 22 Nov 2023 16:37:25 +0100 Subject: [PATCH] eol renormalized --- .gitattributes | 2 +- .gitignore | 10 +- .../AasxPackageExplorer.csproj | 4 +- .../Properties/launchSettings.json | 14 +- .../Model/AASRestClient.cs | 380 ++++----- .../Model/BomSubmodel.cs | 64 +- src/AasxPluginSmdExporter/Model/EClass.cs | 240 +++--- src/AasxPluginSmdExporter/Model/Mapping.cs | 74 +- .../Model/RelationshipElement.cs | 344 ++++---- .../Model/SemanticPort.cs | 112 +-- .../Properties/AssemblyInfo.cs | 72 +- .../Properties/Resources.resx | 200 ++--- .../Resources/IdTables.cs | 220 +++--- .../View/PhysicalDialog.xaml | 154 ++-- src/AasxPluginSmdExporter/View/TextUI.cs | 648 +++++++-------- .../View/Themes/Generic.xaml | 480 +++++------ .../Properties/launchSettings.json | 14 +- src/BlazorExplorer/BlazorExplorer.csproj | 4 +- src/BlazorExplorer/options.json | 746 +++++++++--------- 19 files changed, 1891 insertions(+), 1891 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9664cbf8..06aad29c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ * text=auto -* autocrlf=true +* core.autocrlf=true *.cs text eol=crlf .xaml diff diff --git a/.gitignore b/.gitignore index 931ac6ba..05e40ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,8 @@ sample-aasx/ /src/BlazorUI/09_SchneiderElectric.aasx /.vs/aasx-package-explorer/v16/.suo /.vs/slnx.sqlite -/.vs/aasx-package-explorer/v17/.suo -/src/WpfXamlTool/Properties/AssemblyInfo.cs -/src/WpfMtpVisuViewer/Properties/AssemblyInfo.cs -/src/WpfMtpControl/Properties/AssemblyInfo.cs -/src/MsaglWpfControl/Properties/AssemblyInfo.cs +/.vs/aasx-package-explorer/v17/.suo +/src/WpfXamlTool/Properties/AssemblyInfo.cs +/src/WpfMtpVisuViewer/Properties/AssemblyInfo.cs +/src/WpfMtpControl/Properties/AssemblyInfo.cs +/src/MsaglWpfControl/Properties/AssemblyInfo.cs diff --git a/src/AasxPackageExplorer/AasxPackageExplorer.csproj b/src/AasxPackageExplorer/AasxPackageExplorer.csproj index 9b672f7e..071692fd 100644 --- a/src/AasxPackageExplorer/AasxPackageExplorer.csproj +++ b/src/AasxPackageExplorer/AasxPackageExplorer.csproj @@ -90,8 +90,8 @@ PreserveNewest - - PreserveNewest + + PreserveNewest PreserveNewest diff --git a/src/AasxPackageExplorer/Properties/launchSettings.json b/src/AasxPackageExplorer/Properties/launchSettings.json index d0738d85..efd8b2ba 100644 --- a/src/AasxPackageExplorer/Properties/launchSettings.json +++ b/src/AasxPackageExplorer/Properties/launchSettings.json @@ -1,8 +1,8 @@ -{ - "profiles": { - "AasxPackageExplorer": { - "commandName": "Project", - "commandLineArgs": "-read-json options-debug.json -script debug.MIHO.script" - } - } +{ + "profiles": { + "AasxPackageExplorer": { + "commandName": "Project", + "commandLineArgs": "-read-json options-debug.json -script debug.MIHO.script" + } + } } \ No newline at end of file diff --git a/src/AasxPluginSmdExporter/Model/AASRestClient.cs b/src/AasxPluginSmdExporter/Model/AASRestClient.cs index 67dd1b45..f84308f7 100644 --- a/src/AasxPluginSmdExporter/Model/AASRestClient.cs +++ b/src/AasxPluginSmdExporter/Model/AASRestClient.cs @@ -1,190 +1,190 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json.Linq; - -namespace AasxPluginSmdExporter -{ - public static class AASRestClient - { - static readonly HttpClient httpClient; - - private static bool used; - - - static AASRestClient() - { - httpClient = new HttpClient(); - used = false; - } - - /// - /// Starts the HttpClient and sets its Baseaadress to the given Adress - /// - /// - public static void Start(string baseAddress) - { - if (!used) - { - httpClient.BaseAddress = new Uri(baseAddress); - httpClient.DefaultRequestHeaders.Accept.Clear(); - httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); - used = true; - } - - - } - - /// - /// Returns the Json version of the aas with the given name. - /// - /// - /// - public static async Task GetJson(string path) - { - try - { - - HttpResponseMessage response = httpClient.GetAsync(path).Result; - - if (response.IsSuccessStatusCode) - { - - string respstr = await response.Content.ReadAsStringAsync(); - JObject json = JObject.Parse(respstr); - - return json; - } - - } - catch (Exception e) - { - Console.WriteLine(e.Message); - throw; - } - return null; - } - - public static async Task GetJArray(string path) - { - HttpResponseMessage response = httpClient.GetAsync(path).Result; - if (response.IsSuccessStatusCode) - { - string respstr = await response.Content.ReadAsStringAsync(); - - JArray jarray = JArray.Parse(respstr); - - return jarray; - } - return null; - } - - /// - /// Returns a BillOfMaterial with the currently necessary information - /// - /// - /// - public static BillOfMaterial GetBillofmaterialWithRelationshipElements(string aasID) - { - - - JObject json = GetJson($"aas/{aasID}/submodels/billofmaterial/complete").Result; - - if (json == null || json.SelectToken("hasDataSpecification") == null) - { - return null; - } - - BillOfMaterial billOfMaterial = BillOfMaterial.Parse(json); - billOfMaterial.BomName = aasID; - return billOfMaterial; - - } - - /// - /// Returns the SimulationModel of the given Submodel - /// - /// - /// - public static SimulationModel GetSimulationModel(string name) - { - - JObject simulationModelJson - = AASRestClient.GetJson($"aas/{name}/submodels/SimulationModels/complete").Result; - SimulationModel ret = SimulationModel.Parse(simulationModelJson, name); - return ret; - } - - /// - /// Puts an AAS to the server. - /// - /// - /// - /// - public static bool PutAAS(string aas, string name) - { - HttpResponseMessage response = httpClient.PutAsync($"aas", - new StringContent(aas, Encoding.UTF8, "application/json")).Result; - - return response.IsSuccessStatusCode; - } - - /// - /// Puts an Submodel with Path: aas/{aasId}/submodels to the server. - /// - /// - /// - /// - /// - public static bool PutSubmodel(string submodel, string name, string aasId) - { - HttpResponseMessage response = httpClient.PutAsync($"aas/{aasId}/submodels", - new StringContent(submodel, Encoding.UTF8, "application/json")).Result; - - return response.IsSuccessStatusCode; - } - - - public static bool PutEntity(string submodel_json, string aasId, string nameSub, string nameEntity) - { - HttpResponseMessage response = httpClient.PutAsync($"aas/{aasId}/submodels/{nameSub}/elements/{nameEntity}", - new StringContent(submodel_json, Encoding.UTF8, "application/json")).Result; - - return response.IsSuccessStatusCode; - } - - public static string GetAASNameForAssetId(string assetId) - { - try - { - assetId = WebUtility.UrlEncode(assetId); - var path = $"assets/@qs?qs=IRI,{assetId}"; - - JArray jObject = AASRestClient.GetJArray(path).Result; - - return (string)jObject[0]["idShort"]; - } - catch (Exception) - { - // Could not get asset with assetId - return ""; - } - } - - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace AasxPluginSmdExporter +{ + public static class AASRestClient + { + static readonly HttpClient httpClient; + + private static bool used; + + + static AASRestClient() + { + httpClient = new HttpClient(); + used = false; + } + + /// + /// Starts the HttpClient and sets its Baseaadress to the given Adress + /// + /// + public static void Start(string baseAddress) + { + if (!used) + { + httpClient.BaseAddress = new Uri(baseAddress); + httpClient.DefaultRequestHeaders.Accept.Clear(); + httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + used = true; + } + + + } + + /// + /// Returns the Json version of the aas with the given name. + /// + /// + /// + public static async Task GetJson(string path) + { + try + { + + HttpResponseMessage response = httpClient.GetAsync(path).Result; + + if (response.IsSuccessStatusCode) + { + + string respstr = await response.Content.ReadAsStringAsync(); + JObject json = JObject.Parse(respstr); + + return json; + } + + } + catch (Exception e) + { + Console.WriteLine(e.Message); + throw; + } + return null; + } + + public static async Task GetJArray(string path) + { + HttpResponseMessage response = httpClient.GetAsync(path).Result; + if (response.IsSuccessStatusCode) + { + string respstr = await response.Content.ReadAsStringAsync(); + + JArray jarray = JArray.Parse(respstr); + + return jarray; + } + return null; + } + + /// + /// Returns a BillOfMaterial with the currently necessary information + /// + /// + /// + public static BillOfMaterial GetBillofmaterialWithRelationshipElements(string aasID) + { + + + JObject json = GetJson($"aas/{aasID}/submodels/billofmaterial/complete").Result; + + if (json == null || json.SelectToken("hasDataSpecification") == null) + { + return null; + } + + BillOfMaterial billOfMaterial = BillOfMaterial.Parse(json); + billOfMaterial.BomName = aasID; + return billOfMaterial; + + } + + /// + /// Returns the SimulationModel of the given Submodel + /// + /// + /// + public static SimulationModel GetSimulationModel(string name) + { + + JObject simulationModelJson + = AASRestClient.GetJson($"aas/{name}/submodels/SimulationModels/complete").Result; + SimulationModel ret = SimulationModel.Parse(simulationModelJson, name); + return ret; + } + + /// + /// Puts an AAS to the server. + /// + /// + /// + /// + public static bool PutAAS(string aas, string name) + { + HttpResponseMessage response = httpClient.PutAsync($"aas", + new StringContent(aas, Encoding.UTF8, "application/json")).Result; + + return response.IsSuccessStatusCode; + } + + /// + /// Puts an Submodel with Path: aas/{aasId}/submodels to the server. + /// + /// + /// + /// + /// + public static bool PutSubmodel(string submodel, string name, string aasId) + { + HttpResponseMessage response = httpClient.PutAsync($"aas/{aasId}/submodels", + new StringContent(submodel, Encoding.UTF8, "application/json")).Result; + + return response.IsSuccessStatusCode; + } + + + public static bool PutEntity(string submodel_json, string aasId, string nameSub, string nameEntity) + { + HttpResponseMessage response = httpClient.PutAsync($"aas/{aasId}/submodels/{nameSub}/elements/{nameEntity}", + new StringContent(submodel_json, Encoding.UTF8, "application/json")).Result; + + return response.IsSuccessStatusCode; + } + + public static string GetAASNameForAssetId(string assetId) + { + try + { + assetId = WebUtility.UrlEncode(assetId); + var path = $"assets/@qs?qs=IRI,{assetId}"; + + JArray jObject = AASRestClient.GetJArray(path).Result; + + return (string)jObject[0]["idShort"]; + } + catch (Exception) + { + // Could not get asset with assetId + return ""; + } + } + + } +} diff --git a/src/AasxPluginSmdExporter/Model/BomSubmodel.cs b/src/AasxPluginSmdExporter/Model/BomSubmodel.cs index 713ebe02..2e2aac53 100644 --- a/src/AasxPluginSmdExporter/Model/BomSubmodel.cs +++ b/src/AasxPluginSmdExporter/Model/BomSubmodel.cs @@ -1,32 +1,32 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AasxPluginSmdExporter.Model -{ - public abstract class BomSubmodel - { - - public List PropertyBoms { get; set; } - - public string name { get; set; } - protected BomSubmodel() - { - PropertyBoms = new List(); - } - } - - -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AasxPluginSmdExporter.Model +{ + public abstract class BomSubmodel + { + + public List PropertyBoms { get; set; } + + public string name { get; set; } + protected BomSubmodel() + { + PropertyBoms = new List(); + } + } + + +} diff --git a/src/AasxPluginSmdExporter/Model/EClass.cs b/src/AasxPluginSmdExporter/Model/EClass.cs index 36328a49..a0ed4609 100644 --- a/src/AasxPluginSmdExporter/Model/EClass.cs +++ b/src/AasxPluginSmdExporter/Model/EClass.cs @@ -1,120 +1,120 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using CsvHelper; - -namespace AasxPluginSmdExporter -{ - public class EClass - { - public static Dictionary InputEclassIds { get; set; } - - public static Dictionary OutputEclassIds { get; set; } - public static Dictionary PortEclassIds { get; set; } - - public string Id { get; set; } - - public string Unit { get; set; } - - /// - /// Initializes all necessary dictionaries and in case of success returns true. - /// - /// - public static bool InitEclass(Queue log) - { - InputEclassIds = new Dictionary(); - OutputEclassIds = new Dictionary(); - PortEclassIds = new Dictionary(); - - foreach (var pair in IdTables.InputEclassUnits) - { - EClass eClassIn = new EClass(); - eClassIn.Id = pair.Key; - eClassIn.Unit = pair.Value; - - InputEclassIds.Add(eClassIn.Id, eClassIn); - - if (!PortEclassIds.ContainsKey(eClassIn.Id)) - PortEclassIds.Add(eClassIn.Id.Trim(), eClassIn); - } - - foreach (var pair in IdTables.OutputEclassUnits) - { - EClass eClassOut = new EClass(); - eClassOut.Id = pair.Key; - if (!eClassOut.Id.Equals("") && !eClassOut.Id.Equals("?")) - { - eClassOut.Unit = pair.Value; - OutputEclassIds.Add(eClassOut.Id, eClassOut); - - if (!PortEclassIds.ContainsKey(eClassOut.Id)) - PortEclassIds.Add(eClassOut.Id.Trim(), eClassOut); - } - } - return true; - } - - /// - /// Checks whether or not the two given strings are compatible eclass ids according to the csv data. - /// - /// - /// - /// - public static bool CheckEClassConnection(string inputId, string outputId) - { - - inputId = inputId.Trim(); - outputId = outputId.Trim(); - - if (inputId.Equals(outputId)) - { - return true; - } - - if (IdTables.CompatibleEclassIds.ContainsKey(inputId)) - { - return IdTables.CompatibleEclassIds[inputId].Equals(outputId); - } - else - { - return false; - } - - } - - /// - /// In case the given string is an eclass id and it is in the list the unit is returned - /// - /// - /// - public static string GetUnitForEclassId(string eclassId) - { - eclassId = eclassId.Trim(); - if (PortEclassIds == null) - { - return ""; - } - if (PortEclassIds.ContainsKey(eclassId)) - { - return PortEclassIds[eclassId].Unit; - } - return ""; - } - - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using CsvHelper; + +namespace AasxPluginSmdExporter +{ + public class EClass + { + public static Dictionary InputEclassIds { get; set; } + + public static Dictionary OutputEclassIds { get; set; } + public static Dictionary PortEclassIds { get; set; } + + public string Id { get; set; } + + public string Unit { get; set; } + + /// + /// Initializes all necessary dictionaries and in case of success returns true. + /// + /// + public static bool InitEclass(Queue log) + { + InputEclassIds = new Dictionary(); + OutputEclassIds = new Dictionary(); + PortEclassIds = new Dictionary(); + + foreach (var pair in IdTables.InputEclassUnits) + { + EClass eClassIn = new EClass(); + eClassIn.Id = pair.Key; + eClassIn.Unit = pair.Value; + + InputEclassIds.Add(eClassIn.Id, eClassIn); + + if (!PortEclassIds.ContainsKey(eClassIn.Id)) + PortEclassIds.Add(eClassIn.Id.Trim(), eClassIn); + } + + foreach (var pair in IdTables.OutputEclassUnits) + { + EClass eClassOut = new EClass(); + eClassOut.Id = pair.Key; + if (!eClassOut.Id.Equals("") && !eClassOut.Id.Equals("?")) + { + eClassOut.Unit = pair.Value; + OutputEclassIds.Add(eClassOut.Id, eClassOut); + + if (!PortEclassIds.ContainsKey(eClassOut.Id)) + PortEclassIds.Add(eClassOut.Id.Trim(), eClassOut); + } + } + return true; + } + + /// + /// Checks whether or not the two given strings are compatible eclass ids according to the csv data. + /// + /// + /// + /// + public static bool CheckEClassConnection(string inputId, string outputId) + { + + inputId = inputId.Trim(); + outputId = outputId.Trim(); + + if (inputId.Equals(outputId)) + { + return true; + } + + if (IdTables.CompatibleEclassIds.ContainsKey(inputId)) + { + return IdTables.CompatibleEclassIds[inputId].Equals(outputId); + } + else + { + return false; + } + + } + + /// + /// In case the given string is an eclass id and it is in the list the unit is returned + /// + /// + /// + public static string GetUnitForEclassId(string eclassId) + { + eclassId = eclassId.Trim(); + if (PortEclassIds == null) + { + return ""; + } + if (PortEclassIds.ContainsKey(eclassId)) + { + return PortEclassIds[eclassId].Unit; + } + return ""; + } + + } +} diff --git a/src/AasxPluginSmdExporter/Model/Mapping.cs b/src/AasxPluginSmdExporter/Model/Mapping.cs index 330c13a3..358a0000 100644 --- a/src/AasxPluginSmdExporter/Model/Mapping.cs +++ b/src/AasxPluginSmdExporter/Model/Mapping.cs @@ -1,38 +1,38 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace AasxPluginSmdExporter -{ - public class Mapping - { - public string IdShort { get; set; } - - public string UnknownId { get; set; } - - public string BasicId { get; set; } - - public double Value { get; set; } - - public Mapping(string idShort, string unknownId, string basicId, double value) - { - this.IdShort = idShort; - this.UnknownId = unknownId; - this.BasicId = basicId; - this.Value = value; - } - - } +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace AasxPluginSmdExporter +{ + public class Mapping + { + public string IdShort { get; set; } + + public string UnknownId { get; set; } + + public string BasicId { get; set; } + + public double Value { get; set; } + + public Mapping(string idShort, string unknownId, string basicId, double value) + { + this.IdShort = idShort; + this.UnknownId = unknownId; + this.BasicId = basicId; + this.Value = value; + } + + } } \ No newline at end of file diff --git a/src/AasxPluginSmdExporter/Model/RelationshipElement.cs b/src/AasxPluginSmdExporter/Model/RelationshipElement.cs index 2ccb3d42..5add3ba5 100644 --- a/src/AasxPluginSmdExporter/Model/RelationshipElement.cs +++ b/src/AasxPluginSmdExporter/Model/RelationshipElement.cs @@ -1,172 +1,172 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json.Linq; - -namespace AasxPluginSmdExporter -{ - public class RelationshipElement - { - #region properties - - public String ValueFirst { get; set; } - - public string FirstAssetId { get; set; } - - public string FirstInterface { get; set; } - - public String ValueSecond { get; set; } - - public string SecondAssetId { get; set; } - - public string SecondInterface { get; set; } - - public String IdShort { get; set; } - - - public bool IsCertainConnection { get; set; } - - - - #endregion - - public RelationshipElement() - { - IsCertainConnection = true; - } - - public RelationshipElement(string valueFirst, string valueSecond, string idShort, bool isCertainConnection) - { - ValueFirst = valueFirst.Trim(); - ValueSecond = valueSecond.Trim(); - IdShort = idShort.Trim(); - IsCertainConnection = isCertainConnection; - } - - /// - /// Sets the values according to the asset ids - /// - public void SetValuesAccordingToAsset() - { - if (this.FirstAssetId != null && this.FirstAssetId != "") - this.ValueFirst = getValuesAccordingToAssetHelper(this.FirstAssetId, this.ValueFirst); - if (this.SecondAssetId != null && this.SecondAssetId != "") - { - this.ValueSecond = getValuesAccordingToAssetHelper(this.SecondAssetId, this.ValueSecond); - } - - } - - /// - /// Gets the right value for the assetId - /// - /// - /// - /// - private static string getValuesAccordingToAssetHelper(string assetId, string value) - { - try - { - assetId = WebUtility.UrlEncode(assetId); - var path = $"assets/@qs?qs=IRI,{assetId}"; - - JArray jObject = AASRestClient.GetJArray(path).Result; - - return (string)jObject[0]["idShort"]; - } - catch (Exception) - { - // Could not get asset with assetId - return value; - } - - } - - - - /// - /// Parses the JToken into a RelationshipElement and returns the new created RelationshipElement - /// - /// - /// - /// - /// - /// - /// - /// - public static RelationshipElement Parse(string valueFirst, - string valueSecond, - string idShort, - Dictionary ReferenceToAsset, - string interfaceFirst = null, - string interfaceSecond = null) - { - - - RelationshipElement relationship = new RelationshipElement(); - - - relationship.ValueFirst = valueFirst; - relationship.ValueSecond = valueSecond; - - if (ReferenceToAsset.ContainsKey(relationship.ValueFirst)) - relationship.FirstAssetId = ReferenceToAsset[relationship.ValueFirst]; - if (ReferenceToAsset.ContainsKey(relationship.ValueSecond)) - relationship.SecondAssetId = ReferenceToAsset[relationship.ValueSecond]; - - - - relationship.SetValuesAccordingToAsset(); - - relationship.IdShort = idShort; - - relationship.FirstInterface = interfaceFirst; - relationship.SecondInterface = interfaceSecond; - - return relationship; - - } - - public static RelationshipElement Parse(JToken statement) - { - RelationshipElement relationshipElement = new RelationshipElement(); - relationshipElement.IsCertainConnection = true; - JToken locTokenFirst = statement.SelectToken("first.keys(0).value"); - if (locTokenFirst != null) - { - relationshipElement.FirstAssetId = locTokenFirst.ToString(); - } - JToken locTokenSecond = statement.SelectToken("second.keys(0).value"); - if (locTokenSecond != null) - { - relationshipElement.SecondAssetId = locTokenSecond.ToString(); - } - relationshipElement.SetValuesAccordingToAsset(); - relationshipElement.FirstInterface = relationshipElement.ValueFirst + - ((string)statement.SelectToken("first.keys(2).value")); - relationshipElement.SecondInterface = relationshipElement.ValueSecond + - ((string)statement.SelectToken("second.keys(2).value")); - relationshipElement.IdShort = (string)statement.SelectToken("idShort"); - - if (relationshipElement.ValueFirst == null || relationshipElement.ValueSecond == null) - { - return null; - } - - return relationshipElement; - } - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace AasxPluginSmdExporter +{ + public class RelationshipElement + { + #region properties + + public String ValueFirst { get; set; } + + public string FirstAssetId { get; set; } + + public string FirstInterface { get; set; } + + public String ValueSecond { get; set; } + + public string SecondAssetId { get; set; } + + public string SecondInterface { get; set; } + + public String IdShort { get; set; } + + + public bool IsCertainConnection { get; set; } + + + + #endregion + + public RelationshipElement() + { + IsCertainConnection = true; + } + + public RelationshipElement(string valueFirst, string valueSecond, string idShort, bool isCertainConnection) + { + ValueFirst = valueFirst.Trim(); + ValueSecond = valueSecond.Trim(); + IdShort = idShort.Trim(); + IsCertainConnection = isCertainConnection; + } + + /// + /// Sets the values according to the asset ids + /// + public void SetValuesAccordingToAsset() + { + if (this.FirstAssetId != null && this.FirstAssetId != "") + this.ValueFirst = getValuesAccordingToAssetHelper(this.FirstAssetId, this.ValueFirst); + if (this.SecondAssetId != null && this.SecondAssetId != "") + { + this.ValueSecond = getValuesAccordingToAssetHelper(this.SecondAssetId, this.ValueSecond); + } + + } + + /// + /// Gets the right value for the assetId + /// + /// + /// + /// + private static string getValuesAccordingToAssetHelper(string assetId, string value) + { + try + { + assetId = WebUtility.UrlEncode(assetId); + var path = $"assets/@qs?qs=IRI,{assetId}"; + + JArray jObject = AASRestClient.GetJArray(path).Result; + + return (string)jObject[0]["idShort"]; + } + catch (Exception) + { + // Could not get asset with assetId + return value; + } + + } + + + + /// + /// Parses the JToken into a RelationshipElement and returns the new created RelationshipElement + /// + /// + /// + /// + /// + /// + /// + /// + public static RelationshipElement Parse(string valueFirst, + string valueSecond, + string idShort, + Dictionary ReferenceToAsset, + string interfaceFirst = null, + string interfaceSecond = null) + { + + + RelationshipElement relationship = new RelationshipElement(); + + + relationship.ValueFirst = valueFirst; + relationship.ValueSecond = valueSecond; + + if (ReferenceToAsset.ContainsKey(relationship.ValueFirst)) + relationship.FirstAssetId = ReferenceToAsset[relationship.ValueFirst]; + if (ReferenceToAsset.ContainsKey(relationship.ValueSecond)) + relationship.SecondAssetId = ReferenceToAsset[relationship.ValueSecond]; + + + + relationship.SetValuesAccordingToAsset(); + + relationship.IdShort = idShort; + + relationship.FirstInterface = interfaceFirst; + relationship.SecondInterface = interfaceSecond; + + return relationship; + + } + + public static RelationshipElement Parse(JToken statement) + { + RelationshipElement relationshipElement = new RelationshipElement(); + relationshipElement.IsCertainConnection = true; + JToken locTokenFirst = statement.SelectToken("first.keys(0).value"); + if (locTokenFirst != null) + { + relationshipElement.FirstAssetId = locTokenFirst.ToString(); + } + JToken locTokenSecond = statement.SelectToken("second.keys(0).value"); + if (locTokenSecond != null) + { + relationshipElement.SecondAssetId = locTokenSecond.ToString(); + } + relationshipElement.SetValuesAccordingToAsset(); + relationshipElement.FirstInterface = relationshipElement.ValueFirst + + ((string)statement.SelectToken("first.keys(2).value")); + relationshipElement.SecondInterface = relationshipElement.ValueSecond + + ((string)statement.SelectToken("second.keys(2).value")); + relationshipElement.IdShort = (string)statement.SelectToken("idShort"); + + if (relationshipElement.ValueFirst == null || relationshipElement.ValueSecond == null) + { + return null; + } + + return relationshipElement; + } + } +} diff --git a/src/AasxPluginSmdExporter/Model/SemanticPort.cs b/src/AasxPluginSmdExporter/Model/SemanticPort.cs index bcb2a499..c4e03bb2 100644 --- a/src/AasxPluginSmdExporter/Model/SemanticPort.cs +++ b/src/AasxPluginSmdExporter/Model/SemanticPort.cs @@ -1,56 +1,56 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AasxPluginSmdExporter.Model -{ - public class SemanticPort - { - - static SemanticPort semanticPort; - - /// - /// Returns a Instance of a class which implements - /// - /// - public static SemanticPort GetInstance() - { - if (semanticPort == null) - { - semanticPort = new SemanticPort(); - } - return semanticPort; - } - - /// - /// Returns the semanticID for the given domain - /// - /// - /// - public string GetSemanticForPort(string domain) - { - if (IdTables.SemanticPortsDomain.ContainsKey(domain)) - { - return IdTables.SemanticPortsDomain[domain]; - } - return ""; - } - - protected SemanticPort() - { - - } - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AasxPluginSmdExporter.Model +{ + public class SemanticPort + { + + static SemanticPort semanticPort; + + /// + /// Returns a Instance of a class which implements + /// + /// + public static SemanticPort GetInstance() + { + if (semanticPort == null) + { + semanticPort = new SemanticPort(); + } + return semanticPort; + } + + /// + /// Returns the semanticID for the given domain + /// + /// + /// + public string GetSemanticForPort(string domain) + { + if (IdTables.SemanticPortsDomain.ContainsKey(domain)) + { + return IdTables.SemanticPortsDomain[domain]; + } + return ""; + } + + protected SemanticPort() + { + + } + } +} diff --git a/src/AasxPluginSmdExporter/Properties/AssemblyInfo.cs b/src/AasxPluginSmdExporter/Properties/AssemblyInfo.cs index c9751398..9898ee0f 100644 --- a/src/AasxPluginSmdExporter/Properties/AssemblyInfo.cs +++ b/src/AasxPluginSmdExporter/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die einer Assembly zugeordnet sind. -[assembly: AssemblyTitle("AasxPluginSmdExporter")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AasxPluginSmdExporter")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly -// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von -// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("02c78dbd-7c1e-4e61-9a30-e44a5736339a")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, -// indem Sie "*" wie unten gezeigt eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("AasxPluginSmdExporter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AasxPluginSmdExporter")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("02c78dbd-7c1e-4e61-9a30-e44a5736339a")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/AasxPluginSmdExporter/Properties/Resources.resx b/src/AasxPluginSmdExporter/Properties/Resources.resx index 85c90909..4fdb1b6a 100644 --- a/src/AasxPluginSmdExporter/Properties/Resources.resx +++ b/src/AasxPluginSmdExporter/Properties/Resources.resx @@ -1,101 +1,101 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/src/AasxPluginSmdExporter/Resources/IdTables.cs b/src/AasxPluginSmdExporter/Resources/IdTables.cs index 01fcac48..6d919dac 100644 --- a/src/AasxPluginSmdExporter/Resources/IdTables.cs +++ b/src/AasxPluginSmdExporter/Resources/IdTables.cs @@ -1,110 +1,110 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; - -namespace AasxPluginSmdExporter -{ - public static class IdTables - { - /// - /// To define simulation model ports, a domain is added to every port - /// Only ports with matching domain will be connected from the SMD exporter - /// - public static Dictionary SemanticPortsDomain = new Dictionary() - { - { "Domain", "SemanticId" }, - { "elecDC", "Dies ist elecDC" }, - { "SmdComp_SignalFlow", "www.tedz.itsowl.com/ids/cd/7565_0191_6002_1240" }, - { "SmdComp_PhysicalElectric", "www.tedz.itsowl.com/ids/cd/7565_0191_6002_2222" }, - { "SmdComp_PhysicalMechanic", "placeholder" }, - { "SmdComp_SimModelType", "www.tedz.itsowl.com/ids/cd/3191_3132_1102_6456" }, - { "BoM_SmdComp_Fmu", "www.tedz.itsowl.com/ids/cd/5593_7040_8002_2422" }, - { "BoM_SmdComp_Sum", "www.tedz.itsowl.com/ids/cd/8364_7040_8002_5528" }, - { "BoM_SmdComp_Mult", "www.tedz.itsowl.com/ids/cd/9301_8040_8002_5424" }, - { "BoM_SmdComp_Div", "www.tedz.itsowl.com/ids/cd/6321_8040_8002_3964" }, - { "BoM_Comp_Interface", "www.tedz.itsowl.com/ids/cd/7221_0191_0102_0108" }, - { "BoM_SmdComp_PhyNode", "placeholder" } - }; - /// - /// The SMD Exporters draws connections between simulations models based on EClass IDs. - /// This dictionary includes all supported connections between simulation model ports - /// - public static Dictionary CompatibleEclassIds = new Dictionary() - { - { "eclassIn", "eclassOut" }, - { "0173-1#02-AAU445#002", "0173-1#02-BAB975#006" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", - "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", - "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869" }, - { "0173-1#02-BAC200#007", "0173-1#02-AAB427#007" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", - "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607" }, - { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", - "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718" }, - { "0173-1#02-AAG870#003", "0173-1#02-AAG870#003" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", - "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355" }, - { "0173-1#02-BAA977#005", "0173-1#02-BAA977#005" }, - { "0173-1#02-AAJ701#002", "0173-1#02-AAC967#006" }, - { "0173-1#02-BAI019#003", "0173-1#02-BAI019#003" }, - { "0173-1#02-AAI902#001", "0173-1#02-AAI902#001" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", - "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", - "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721" } - }; - /// - /// Supported simulation model input ports with affiliated units - /// - public static Dictionary InputEclassUnits = new Dictionary() - { - { "eclassInId", "eclassInUnit" }, - { "0173-1#02-AAU445#002", "A (Ampere)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", "A (Ampere)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", "A (Ampere)" }, - { "0173-1#02-BAC200#007", "V (Volt)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", "V (Volt)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", "V (Volt)" }, - { "0173-1#02-AAG870#003", "1/min (Umdrehungen pro Minute)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", "1/min (Umdrehungen pro Minute)" }, - { "0173-1#02-BAA977#005", "N*m (Newtonmeter)" }, - { "0173-1#02-AAJ701#002", "V*A (Voltampere)" }, - { "0173-1#02-BAI019#003", "m/s (Meter pro Sekunde)" }, - { "0173-1#02-AAI902#001", "N (Newton)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", "-" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", "-" } - }; - /// - /// Supported simulation model output ports with affiliated units - /// - public static Dictionary OutputEclassUnits = new Dictionary() - { - { "eclassOutId", "eclassOutUnit" }, - { "0173-1#02-BAB975#006", "A (Ampere)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", "A (Ampere)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", "A (Ampere)" }, - { "0173-1#02-AAB427#007", "V (Volt)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", "V (Volt)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", "V (Volt)" }, - { "0173-1#02-AAG870#003", "1/min (Umdrehungen pro Minute)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", "1/min (Umdrehungen pro Minute)" }, - { "0173-1#02-BAA977#005", "N*m (Newtonmeter)" }, - { "0173-1#02-AAC967#006", "V*A (Voltampere)" }, - { "0173-1#02-BAI019#003", "m/s (Meter pro Sekunde)" }, - { "0173-1#02-AAI902#001", "Schubkraft (In)" }, - { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", "-" }, - { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", "-" } - }; - - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; + +namespace AasxPluginSmdExporter +{ + public static class IdTables + { + /// + /// To define simulation model ports, a domain is added to every port + /// Only ports with matching domain will be connected from the SMD exporter + /// + public static Dictionary SemanticPortsDomain = new Dictionary() + { + { "Domain", "SemanticId" }, + { "elecDC", "Dies ist elecDC" }, + { "SmdComp_SignalFlow", "www.tedz.itsowl.com/ids/cd/7565_0191_6002_1240" }, + { "SmdComp_PhysicalElectric", "www.tedz.itsowl.com/ids/cd/7565_0191_6002_2222" }, + { "SmdComp_PhysicalMechanic", "placeholder" }, + { "SmdComp_SimModelType", "www.tedz.itsowl.com/ids/cd/3191_3132_1102_6456" }, + { "BoM_SmdComp_Fmu", "www.tedz.itsowl.com/ids/cd/5593_7040_8002_2422" }, + { "BoM_SmdComp_Sum", "www.tedz.itsowl.com/ids/cd/8364_7040_8002_5528" }, + { "BoM_SmdComp_Mult", "www.tedz.itsowl.com/ids/cd/9301_8040_8002_5424" }, + { "BoM_SmdComp_Div", "www.tedz.itsowl.com/ids/cd/6321_8040_8002_3964" }, + { "BoM_Comp_Interface", "www.tedz.itsowl.com/ids/cd/7221_0191_0102_0108" }, + { "BoM_SmdComp_PhyNode", "placeholder" } + }; + /// + /// The SMD Exporters draws connections between simulations models based on EClass IDs. + /// This dictionary includes all supported connections between simulation model ports + /// + public static Dictionary CompatibleEclassIds = new Dictionary() + { + { "eclassIn", "eclassOut" }, + { "0173-1#02-AAU445#002", "0173-1#02-BAB975#006" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", + "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", + "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869" }, + { "0173-1#02-BAC200#007", "0173-1#02-AAB427#007" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", + "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607" }, + { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", + "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718" }, + { "0173-1#02-AAG870#003", "0173-1#02-AAG870#003" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", + "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355" }, + { "0173-1#02-BAA977#005", "0173-1#02-BAA977#005" }, + { "0173-1#02-AAJ701#002", "0173-1#02-AAC967#006" }, + { "0173-1#02-BAI019#003", "0173-1#02-BAI019#003" }, + { "0173-1#02-AAI902#001", "0173-1#02-AAI902#001" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", + "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", + "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721" } + }; + /// + /// Supported simulation model input ports with affiliated units + /// + public static Dictionary InputEclassUnits = new Dictionary() + { + { "eclassInId", "eclassInUnit" }, + { "0173-1#02-AAU445#002", "A (Ampere)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", "A (Ampere)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", "A (Ampere)" }, + { "0173-1#02-BAC200#007", "V (Volt)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", "V (Volt)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", "V (Volt)" }, + { "0173-1#02-AAG870#003", "1/min (Umdrehungen pro Minute)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", "1/min (Umdrehungen pro Minute)" }, + { "0173-1#02-BAA977#005", "N*m (Newtonmeter)" }, + { "0173-1#02-AAJ701#002", "V*A (Voltampere)" }, + { "0173-1#02-BAI019#003", "m/s (Meter pro Sekunde)" }, + { "0173-1#02-AAI902#001", "N (Newton)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", "-" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", "-" } + }; + /// + /// Supported simulation model output ports with affiliated units + /// + public static Dictionary OutputEclassUnits = new Dictionary() + { + { "eclassOutId", "eclassOutUnit" }, + { "0173-1#02-BAB975#006", "A (Ampere)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1213_2122_7002_4649", "A (Ampere)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1053_2122_7002_4869", "A (Ampere)" }, + { "0173-1#02-AAB427#007", "V (Volt)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6522_2122_7002_4607", "V (Volt)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/0082_2122_7002_4718", "V (Volt)" }, + { "0173-1#02-AAG870#003", "1/min (Umdrehungen pro Minute)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6130_2122_7002_4355", "1/min (Umdrehungen pro Minute)" }, + { "0173-1#02-BAA977#005", "N*m (Newtonmeter)" }, + { "0173-1#02-AAC967#006", "V*A (Voltampere)" }, + { "0173-1#02-BAI019#003", "m/s (Meter pro Sekunde)" }, + { "0173-1#02-AAI902#001", "Schubkraft (In)" }, + { "http://tedz.itsowl.com/demo/cd/1/1/6484_9013_7002_8349", "-" }, + { "http://tedz.itsowl.com/demo/cd/1/1/1102_2171_1102_8721", "-" } + }; + + } +} diff --git a/src/AasxPluginSmdExporter/View/PhysicalDialog.xaml b/src/AasxPluginSmdExporter/View/PhysicalDialog.xaml index 175ad604..8bc6548d 100644 --- a/src/AasxPluginSmdExporter/View/PhysicalDialog.xaml +++ b/src/AasxPluginSmdExporter/View/PhysicalDialog.xaml @@ -1,77 +1,77 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Choose preferred simulation model type - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Choose preferred simulation model type + + + + + + + + + + + + + + + + + diff --git a/src/AasxPluginSmdExporter/View/TextUI.cs b/src/AasxPluginSmdExporter/View/TextUI.cs index 974180b9..485ad2fd 100644 --- a/src/AasxPluginSmdExporter/View/TextUI.cs +++ b/src/AasxPluginSmdExporter/View/TextUI.cs @@ -1,324 +1,324 @@ -/* -Copyright (c) 2021 KEB Automation KG , -Copyright (c) 2021 Lenze SE , -author: Jonas Grote, Denis Göllner, Sebastian Bischof - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AasxPluginSmdExporter.Model; - -namespace AasxPluginSmdExporter -{ - public class TextUI - { - private Exporter exporter; - - private Queue logs; - - public TextUI() - { - logs = new Queue(); - } - - public TextUI(Queue logs) - { - this.logs = logs; - } - public Queue Start(string host, string machine) - { - string locstring = "Physical"; - return this.Start(host, machine, locstring); - } - - - public Queue Start(string host, string machine, string modeltype) - { - bool usePhysical = modeltype.Equals("Physical"); - exporter = new Exporter(usePhysical); - Console.WriteLine($"--- {machine} ---"); - Console.WriteLine(); - logs.Enqueue($"---{machine}---"); - logs.Enqueue(""); - if (CreateSMD(host, machine)) - { - CreateConnections(); - PutSmd(); - - - CreateSummingPoints(); - CreateMultPoints(); - CreatePhysicalNodes(); - logs.Enqueue("--- Warnings ---"); - ToManyInputThrough(); - ToManyOutputAcross(); - logs.Enqueue("----------------"); - logs.Enqueue(""); - Console.WriteLine(); - PutSmd(); - } - return logs; - } - - public bool CreateSMD(string host, string machine) - { - if (SemanticPort.GetInstance() == null) - { - logs.Enqueue("Missing semantic ID csv"); - Console.WriteLine("Missing semantic ID csv"); - } - else - { - if (EClass.InitEclass(logs) && SemanticPort.GetInstance() != null) - { - - try - { - if (exporter.CreateSMD(host, machine)) - { - List noFmu = exporter.GetSimulationModelsWithoutFMU(); - foreach (var sim in noFmu) - { - Console.WriteLine($"SimulationModel {sim.Name} has no Fmu"); - Console.WriteLine(); - logs.Enqueue($"SimulationModel {sim.Name} has no Fmu"); - logs.Enqueue(""); - } - - foreach (var warning in SimulationModel.Warnings) - { - Console.WriteLine(warning); - logs.Enqueue(warning); - } - } - else - { - Console.WriteLine($"Could not find or read {machine}." + - $" Please check the name of the AAS and structure of the aasx"); - logs.Enqueue($"Could not find or read {machine}." + - $" Please check the name of the AAS and structure of the aasx"); - return false; - } - } - catch (AggregateException e) - { - print("No Connection:" + e.Message); - Console.WriteLine(); - logs.Enqueue("No Connection:" + e.Message); - logs.Enqueue(""); - return false; - } - - return true; - } - else - { - Console.WriteLine("No mappings.csv found or does not contain all rows"); - logs.Enqueue("No mappings.csv found or does not contain all rows"); - return false; - } - } - return false; - - - - - - } - - public void CreateConnections() - { - - foreach (var relationshipElement in exporter.RelationshipElements) - { - - - Console.WriteLine(); - Console.WriteLine(); - Console.WriteLine("---------------------------------------------------------------------------"); - Console.WriteLine($"--- Checking connections for {relationshipElement.ValueFirst} " + - $"and {relationshipElement.ValueSecond} ---"); - Console.WriteLine(); - logs.Enqueue(""); - logs.Enqueue(""); - logs.Enqueue("--------------------------------------------------------------------------------"); - logs.Enqueue($"--- Checking connections for {relationshipElement.ValueFirst}" + - $" and {relationshipElement.ValueSecond} ---"); - logs.Enqueue(""); - bool noError = true; - - if (!exporter.CheckCompatibleDomainsAndConnect(relationshipElement, - relationshipElement.ValueFirst, - relationshipElement.ValueSecond, - relationshipElement.FirstInterface, - relationshipElement.SecondInterface)) - { - - } - - List difDatatype = exporter.ReturnListWithMessageForDifferentDatatypes(relationshipElement, - relationshipElement.ValueFirst, - relationshipElement.ValueSecond); - if (difDatatype.Count != 0) - { - foreach (var dif in difDatatype) - { - print("-" + dif); - logs.Enqueue("-" + dif); - noError = false; - } - } - - List difEclass = exporter.CheckeClassConnectionAndRemoveIncompatible(relationshipElement, - relationshipElement.ValueFirst, - relationshipElement.ValueSecond); - if (difEclass.Count != 0) - { - foreach (var dif in difEclass) - { - print("-" + dif); - logs.Enqueue("-" + dif); - noError = false; - } - } - - if (!exporter.RelationHasConnection(relationshipElement)) - { - print($"{relationshipElement.ValueFirst} and" + - $"{relationshipElement.ValueSecond} have no connection!"); - logs.Enqueue($"{relationshipElement.ValueFirst} and" + - $"{relationshipElement.ValueSecond} have no connection!"); - noError = false; - } - - - if (noError) - { - print("-No error", ConsoleColor.DarkGreen); - Console.WriteLine(""); - logs.Enqueue("-No error"); - logs.Enqueue(""); - } - - - logs.Enqueue("------------------------------------------------------------------------------"); - Console.WriteLine("------------------------------------------------------------------------------"); - } - - } - - public void CreateSummingPoints() - { - if (exporter.CreateSummingPoints()) - { - Console.WriteLine("-SummingPoints successfully created"); - logs.Enqueue("-SummingPoints successfully created"); - logs.Enqueue(""); - } - } - - public void CreateMultPoints() - { - if (exporter.CreateMultPoints()) - { - Console.WriteLine(""); - Console.WriteLine("-MultPoints successfully created"); - logs.Enqueue("-MultPoints successfully created"); - logs.Enqueue(""); - } - } - - public void CreatePhysicalNodes() - { - exporter.CreateNodesForPhysicalPorts(); - } - - private void outputConnections() - { - foreach (var sim in exporter.SimulationsModels.Values) - { - Console.WriteLine(); - logs.Enqueue(""); - logs.Enqueue(""); - Console.WriteLine(sim.Name); - logs.Enqueue(sim.Name); - logs.Enqueue(""); - foreach (var port in sim.Inputs) - { - foreach (var output in port.ConnectedTo) - { - Console.WriteLine(port.IdShort + " connected to " + output.IdShort); - logs.Enqueue(port.IdShort + " connected to " + output.IdShort); - logs.Enqueue(""); - } - } - foreach (var port in sim.Outputs) - { - foreach (var output in port.ConnectedTo) - { - Console.WriteLine(port.IdShort + " connected to " + output.IdShort); - logs.Enqueue(port.IdShort + " connected to " + output.IdShort); - logs.Enqueue(""); - } - } - } - } - - public void PutSmd() - { - if (exporter.PutSMD()) - { - print("-Successfully put Submodel", ConsoleColor.DarkGreen); - logs.Enqueue("-Successfully put Submodel"); - logs.Enqueue(""); - } - else - { - print("-Error while putting Submodel", ConsoleColor.Red); - logs.Enqueue("-Error while putting Submodel"); - logs.Enqueue(""); - } - } - - public void ToManyOutputAcross() - { - - foreach (var warning in exporter.ToManyOutputsAcross()) - { - print(warning, ConsoleColor.Blue); - logs.Enqueue(warning); - } - } - - public void ToManyInputThrough() - { - foreach (var warning in exporter.ToManyOutputThrough()) - { - print(warning, ConsoleColor.Blue); - logs.Enqueue(warning); - } - } - public static void print(string str) - { - - Console.BackgroundColor = ConsoleColor.Red; - Console.WriteLine(str); - Console.ResetColor(); - } - public static void print(string str, ConsoleColor color) - { - Console.BackgroundColor = color; - Console.WriteLine(str); - Console.ResetColor(); - } - - } -} +/* +Copyright (c) 2021 KEB Automation KG , +Copyright (c) 2021 Lenze SE , +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using AasxPluginSmdExporter.Model; + +namespace AasxPluginSmdExporter +{ + public class TextUI + { + private Exporter exporter; + + private Queue logs; + + public TextUI() + { + logs = new Queue(); + } + + public TextUI(Queue logs) + { + this.logs = logs; + } + public Queue Start(string host, string machine) + { + string locstring = "Physical"; + return this.Start(host, machine, locstring); + } + + + public Queue Start(string host, string machine, string modeltype) + { + bool usePhysical = modeltype.Equals("Physical"); + exporter = new Exporter(usePhysical); + Console.WriteLine($"--- {machine} ---"); + Console.WriteLine(); + logs.Enqueue($"---{machine}---"); + logs.Enqueue(""); + if (CreateSMD(host, machine)) + { + CreateConnections(); + PutSmd(); + + + CreateSummingPoints(); + CreateMultPoints(); + CreatePhysicalNodes(); + logs.Enqueue("--- Warnings ---"); + ToManyInputThrough(); + ToManyOutputAcross(); + logs.Enqueue("----------------"); + logs.Enqueue(""); + Console.WriteLine(); + PutSmd(); + } + return logs; + } + + public bool CreateSMD(string host, string machine) + { + if (SemanticPort.GetInstance() == null) + { + logs.Enqueue("Missing semantic ID csv"); + Console.WriteLine("Missing semantic ID csv"); + } + else + { + if (EClass.InitEclass(logs) && SemanticPort.GetInstance() != null) + { + + try + { + if (exporter.CreateSMD(host, machine)) + { + List noFmu = exporter.GetSimulationModelsWithoutFMU(); + foreach (var sim in noFmu) + { + Console.WriteLine($"SimulationModel {sim.Name} has no Fmu"); + Console.WriteLine(); + logs.Enqueue($"SimulationModel {sim.Name} has no Fmu"); + logs.Enqueue(""); + } + + foreach (var warning in SimulationModel.Warnings) + { + Console.WriteLine(warning); + logs.Enqueue(warning); + } + } + else + { + Console.WriteLine($"Could not find or read {machine}." + + $" Please check the name of the AAS and structure of the aasx"); + logs.Enqueue($"Could not find or read {machine}." + + $" Please check the name of the AAS and structure of the aasx"); + return false; + } + } + catch (AggregateException e) + { + print("No Connection:" + e.Message); + Console.WriteLine(); + logs.Enqueue("No Connection:" + e.Message); + logs.Enqueue(""); + return false; + } + + return true; + } + else + { + Console.WriteLine("No mappings.csv found or does not contain all rows"); + logs.Enqueue("No mappings.csv found or does not contain all rows"); + return false; + } + } + return false; + + + + + + } + + public void CreateConnections() + { + + foreach (var relationshipElement in exporter.RelationshipElements) + { + + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine("---------------------------------------------------------------------------"); + Console.WriteLine($"--- Checking connections for {relationshipElement.ValueFirst} " + + $"and {relationshipElement.ValueSecond} ---"); + Console.WriteLine(); + logs.Enqueue(""); + logs.Enqueue(""); + logs.Enqueue("--------------------------------------------------------------------------------"); + logs.Enqueue($"--- Checking connections for {relationshipElement.ValueFirst}" + + $" and {relationshipElement.ValueSecond} ---"); + logs.Enqueue(""); + bool noError = true; + + if (!exporter.CheckCompatibleDomainsAndConnect(relationshipElement, + relationshipElement.ValueFirst, + relationshipElement.ValueSecond, + relationshipElement.FirstInterface, + relationshipElement.SecondInterface)) + { + + } + + List difDatatype = exporter.ReturnListWithMessageForDifferentDatatypes(relationshipElement, + relationshipElement.ValueFirst, + relationshipElement.ValueSecond); + if (difDatatype.Count != 0) + { + foreach (var dif in difDatatype) + { + print("-" + dif); + logs.Enqueue("-" + dif); + noError = false; + } + } + + List difEclass = exporter.CheckeClassConnectionAndRemoveIncompatible(relationshipElement, + relationshipElement.ValueFirst, + relationshipElement.ValueSecond); + if (difEclass.Count != 0) + { + foreach (var dif in difEclass) + { + print("-" + dif); + logs.Enqueue("-" + dif); + noError = false; + } + } + + if (!exporter.RelationHasConnection(relationshipElement)) + { + print($"{relationshipElement.ValueFirst} and" + + $"{relationshipElement.ValueSecond} have no connection!"); + logs.Enqueue($"{relationshipElement.ValueFirst} and" + + $"{relationshipElement.ValueSecond} have no connection!"); + noError = false; + } + + + if (noError) + { + print("-No error", ConsoleColor.DarkGreen); + Console.WriteLine(""); + logs.Enqueue("-No error"); + logs.Enqueue(""); + } + + + logs.Enqueue("------------------------------------------------------------------------------"); + Console.WriteLine("------------------------------------------------------------------------------"); + } + + } + + public void CreateSummingPoints() + { + if (exporter.CreateSummingPoints()) + { + Console.WriteLine("-SummingPoints successfully created"); + logs.Enqueue("-SummingPoints successfully created"); + logs.Enqueue(""); + } + } + + public void CreateMultPoints() + { + if (exporter.CreateMultPoints()) + { + Console.WriteLine(""); + Console.WriteLine("-MultPoints successfully created"); + logs.Enqueue("-MultPoints successfully created"); + logs.Enqueue(""); + } + } + + public void CreatePhysicalNodes() + { + exporter.CreateNodesForPhysicalPorts(); + } + + private void outputConnections() + { + foreach (var sim in exporter.SimulationsModels.Values) + { + Console.WriteLine(); + logs.Enqueue(""); + logs.Enqueue(""); + Console.WriteLine(sim.Name); + logs.Enqueue(sim.Name); + logs.Enqueue(""); + foreach (var port in sim.Inputs) + { + foreach (var output in port.ConnectedTo) + { + Console.WriteLine(port.IdShort + " connected to " + output.IdShort); + logs.Enqueue(port.IdShort + " connected to " + output.IdShort); + logs.Enqueue(""); + } + } + foreach (var port in sim.Outputs) + { + foreach (var output in port.ConnectedTo) + { + Console.WriteLine(port.IdShort + " connected to " + output.IdShort); + logs.Enqueue(port.IdShort + " connected to " + output.IdShort); + logs.Enqueue(""); + } + } + } + } + + public void PutSmd() + { + if (exporter.PutSMD()) + { + print("-Successfully put Submodel", ConsoleColor.DarkGreen); + logs.Enqueue("-Successfully put Submodel"); + logs.Enqueue(""); + } + else + { + print("-Error while putting Submodel", ConsoleColor.Red); + logs.Enqueue("-Error while putting Submodel"); + logs.Enqueue(""); + } + } + + public void ToManyOutputAcross() + { + + foreach (var warning in exporter.ToManyOutputsAcross()) + { + print(warning, ConsoleColor.Blue); + logs.Enqueue(warning); + } + } + + public void ToManyInputThrough() + { + foreach (var warning in exporter.ToManyOutputThrough()) + { + print(warning, ConsoleColor.Blue); + logs.Enqueue(warning); + } + } + public static void print(string str) + { + + Console.BackgroundColor = ConsoleColor.Red; + Console.WriteLine(str); + Console.ResetColor(); + } + public static void print(string str, ConsoleColor color) + { + Console.BackgroundColor = color; + Console.WriteLine(str); + Console.ResetColor(); + } + + } +} diff --git a/src/AasxPluginSmdExporter/View/Themes/Generic.xaml b/src/AasxPluginSmdExporter/View/Themes/Generic.xaml index 0791d3bb..912f3e16 100644 --- a/src/AasxPluginSmdExporter/View/Themes/Generic.xaml +++ b/src/AasxPluginSmdExporter/View/Themes/Generic.xaml @@ -1,241 +1,241 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/AasxUaNetConsoleServer/Properties/launchSettings.json b/src/AasxUaNetConsoleServer/Properties/launchSettings.json index 353ff464..7393c712 100644 --- a/src/AasxUaNetConsoleServer/Properties/launchSettings.json +++ b/src/AasxUaNetConsoleServer/Properties/launchSettings.json @@ -1,8 +1,8 @@ -{ - "profiles": { - "AasxUaNetConsoleServer": { - "commandName": "Project", - "commandLineArgs": "D:\\Code\\aasx-server\\src\\AasxServerBlazor\\erich-repo.aasx" - } - } +{ + "profiles": { + "AasxUaNetConsoleServer": { + "commandName": "Project", + "commandLineArgs": "D:\\Code\\aasx-server\\src\\AasxServerBlazor\\erich-repo.aasx" + } + } } \ No newline at end of file diff --git a/src/BlazorExplorer/BlazorExplorer.csproj b/src/BlazorExplorer/BlazorExplorer.csproj index 4d78b9b5..a7aedbcc 100644 --- a/src/BlazorExplorer/BlazorExplorer.csproj +++ b/src/BlazorExplorer/BlazorExplorer.csproj @@ -96,8 +96,8 @@ PreserveNewest - - PreserveNewest + + PreserveNewest True diff --git a/src/BlazorExplorer/options.json b/src/BlazorExplorer/options.json index a84ee024..cee91f9f 100644 --- a/src/BlazorExplorer/options.json +++ b/src/BlazorExplorer/options.json @@ -1,373 +1,373 @@ -{ - /* "AasxToLoad" : "sample-techdata.aasx", */ - /* "AasxToLoad": "..\\..\\..\\..\\AasxToolkit\\bin\\Debug\\sample.aasx", */ - /* "AasxToLoad": "sample-hsu.aasx", */ - /* "AasxToLoad": "MTPsample.aasx", */ - /* "AasxToLoad": "sample-generated-modified.aasx", */ - /* "AasxToLoad": "..\\..\\..\\..\\..\\..\\aasx-sample-data\\Develop_AAS\\Sample-Fluiddraw.aasx", */ - /* "AasxRepositoryFn": "..\\..\\..\\..\\..\\Sample_AAS\\aasxrepo-new.json", */ - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo\\FestoDemoBox-RepositoryViaHTTP.json", */ - // "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo3\\Festo-DemoBox-repo-local.json", - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\Festo_Demo_Box\\Festo-DemoBox-repo-CPX_E.json", */ - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\new-aasx-repo.json", */ - // "AasxRepositoryFn": "C:\\HOMI\\Develop\\Aasx\\repo_demo_case\\Festo-DemoCase-repo-local.json", - /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\200806_Sample_Repo_with_Fluidic_Plan\\MTPsample.aasx", */ - /* "AasxToLoad": "http://localhost:51310/server/getaasx/0", */ - /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\AasxFesto\\AasxFesto\\AasxFctTool\\bin\\Debug\\net472\\test.aasx", */ - /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\Festo_SPAU_VR3_UA.aasx", */ - /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", */ - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_forV3-spiel.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\00_FestoDemoBox-Module-2-Kopie2.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\IDTA 02003-1-2_Template_TechnicalData.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\SMT_Sample_B.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\IDTA 02006-2-1_Template_Digital Nameplate_V3_lang.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_DPPV2.aasx", - // "AuxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\SMT_Sample_A.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_V3new_spiel1.aasx", - // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_DPPV2.aasx", - "WindowLeft": 100, - "WindowTop": -1, - "WindowWidth": 900, - "WindowHeight": 600, - "WindowMaximized": false, - "TemplateIdAas": "www.example.com/ids/aas/DDDD_DDDD_DDDD_DDDD", - "TemplateIdAsset": "www.example.com/ids/asset/DDDD_DDDD_DDDD_DDDD", - "TemplateIdSubmodelInstance": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", - "TemplateIdSubmodelTemplate": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", - "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", - "EclassDir": ".\\eclass\\", - /* "LogoFile": "SpecPI40_t.png", */ - "LogoFile": "PI40_and_IDTA.png", - "QualifiersFile": "qualifier-presets.json", - "ExtensionsPresetFile": "extension-presets.json", - "IdentifierKeyValuePairsFile": "local-identifier-presets.json", - "ContentHome": "https://github.com/admin-shell/io/blob/master/README.md", - "UseFlyovers": true, - "SplashTime": 0, - "InternalBrowser": false, - "EclassTwoPass": true, - "BackupDir": ".\\backup", - "BackupFiles": 10, - "RestServerHost": "localhost", - "RestServerPort": "1111", - "WriteDefaultOptionsFN": null /* "options-written.json" */, - "IndirectLoadSave": true, - "AccentColors": {}, - "LoadWithoutPrompt": true, - "ShowIdAsIri": false, - "VerboseConnect": true, - "DefaultStayConnected": true, - "DefaultUpdatePeriod": 1000, - "StayConnectOptions": "REST-QUEUE", // SIM - /* "DefaultConnectRepositoryLocation": "http://localhost:51310", */ - /* "DefaultConnectRepositoryLocation": "http://admin-shell-io.com:51510", */ - /* "DefaultConnectRepositoryLocation": "https://admin-shell-io.com:51711", */ - "DefaultConnectRepositoryLocation": "https://admin-shell-io.com/51711", - "MqttPublisherOptions": { - "BrokerUrl": "192.168.178.97:1883", - "MqttRetain": false, - "EnableFirstPublish": true, - "FirstTopicAAS": "AAS", - "FirstTopicSubmodel": "{aas}/Submodel_{sm}", - "EnableEventPublish": true, - "EventTopic": "Events/aas/{aas}/sm/{sm}/{path}", - "SingleValuePublish": true, - "SingleValueFirstTime": true, - "SingleValueTopic": "Values/aas/{aas}/sm/{sm}/{path}" - }, - "UserDir": ".\\userdata", - "UserName": "miho", - "Remarks": [ - "This JSON file might contain special settings for debugging purposes of Michael Hoffmeisters setup." - ], - "PluginPrefer": "ANYUI", - "PluginDll": [ - /* - { - "Path": "..\\..\\..\\..\\..\\AasxPluginUaNetServer\\bin\\Debug\\net472\\AasxPluginUaNetServer.dll", - "Args": [ - "-single-nodeids", - "-single-keys", - "-ns", - "2", - "-ns", - "3" - ], - "Options": null - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginUaNetClient\\bin\\Debug\\net472\\AasxPluginUaNetClient.dll", - "Args": [], - "Options": null - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net472\\AasxPluginBomStructure.dll", - "Args": [] - }, - { - "Path": "..\\AasxPluginBomStructure\\bin\\Debug\\net6.0-windows\\AasxPluginBomStructure.dll", - "Args": [] - }, - { - "Path": "..\\AasxPluginMtpViewer\\bin\\Debug\\net6.0-windows\\AasxPluginMtpViewer.dll", - "Args": [] - }, - */ - { - "Path": ".\\plugins\\AasxPluginKnownSubmodels\\AasxPluginKnownSubmodels.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginDigitalNameplate\\AasxPluginDigitalNameplate.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginDocumentShelf\\AasxPluginDocumentShelf.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginContactInformation\\AasxPluginContactInformation.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginGenericForms\\AasxPluginGenericForms.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginTechnicalData\\AasxPluginTechnicalData.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginPlotting\\AasxPluginPlotting.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginImageMap\\AasxPluginImageMap.dll", - "Args": [] - }, - { - "Path": ".\\plugins\\AasxPluginExportTable\\AasxPluginExportTable.dll", - "Args": [] - } - // Festo specific from here on - /* , - { - "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawViewer\\bin\\Debug\\net6.0-windows\\AasxPluginFluiddrawViewer.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawBom\\bin\\Debug\\net6.0-windows\\AasxPluginFluiddrawBom.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\net6.0-windows\\AasxPluginWebBrowser.dll", - "Args": [] - } - // Festo specific from here on - { - "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawViewer\\bin\\Debug\\AasxPluginFluiddrawViewer.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawBom\\bin\\Debug\\AasxPluginFluiddrawBom.dll", - "Args": [] - } - */ - ], - "SecureConnectPresets": [ - { - "Name": "Internet Demo", - "Protocol": { - "Value": "Azure", - "Choices": [ - "Unprotected", - "OpenID Connect", - "Azure" - ] - }, - "AuthorizationServer": { - "Value": "http://auth1.phoenix.com", - "Choices": [ - "http://auth2.phoenix.com", - "http://auth1.phoenix.com", - "http://auth3.phoenix.com" - ] - }, - "AasServer": { - "Value": "http://aas2.phoenix.com", - "Choices": [ - "http://aas3.phoenix.com", - "http://aas2.phoenix.com", - "http://aas1.phoenix.com" - ] - }, - "CertificateFile": { - "Value": "wieso.txt", - "Choices": [ - "C:\\FILE1.TXT", - "C:\\FILE2.TXT", - "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" - ] - }, - "Password": { - "Value": "sescret", - "Choices": [ - "geheim", - "hidden", - "Pand0ra" - ] - } - }, - { - "Name": "Only Intranet", - "Protocol": { - "Value": "Unprotected", - "Choices": [ - "Unprotected", - "OpenID Connect", - "Azure" - ] - }, - "AuthorizationServer": { - "Value": "http://auth3.phoenix.com", - "Choices": [ - "http://auth2.phoenix.com", - "http://auth1.phoenix.com", - "http://auth3.phoenix.com" - ] - }, - "AasServer": { - "Value": "http://aas1.phoenix.com", - "Choices": [ - "http://aas3.phoenix.com", - "http://aas2.phoenix.com", - "http://aas1.phoenix.com" - ] - }, - "CertificateFile": { - "Value": "wieso22.txt", - "Choices": [ - "C:\\FILE1.TXT", - "C:\\FILE2.TXT", - "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" - ] - } - } - ], - "IntegratedConnectPresets": [ - { - "Name": "Empty", - "Location": "", - "Username": "", - "Password": "" - }, - { - "Name": "First of admin-shell-io.com", - "Location": "http://admin-shell-io.com:51310/server/getaasx/0", - "Username": "", - "Password": "", - "StayConnected": true - }, - { - "Name": "DEMO", - "Location": "http://demo/", - "Username": "Foo", - "Password": "Bar", - "AutoClose": false - }, - { - "Name": "Long loading of admin-shell-io.com", - "Location": "http://admin-shell-io.com:51410/server/getaasx/3", - "Username": "", - "Password": "", - "StayConnected": true, - "AutoClose": false - }, - { - "Name": "Latest testing", - "Location": "http://admin-shell-io.com:52001/server/getaasx/0", - "Username": "", - "Password": "", - "StayConnected": true, - "AutoClose": false - } - ], - "FontSizePreset": 16, - "ScriptPresets": [ - { - "Name": "Test1", - "Lines": [ - "Select(\"AAS\", \"First\");", - "Sleep(1000);", - "Location(\"Push\");", - "Sleep(1000);", - "Select(\"Submodel\", \"First\");", - "Sleep(1000);", - "while (true) {", - " rf = Select(\"This\");", - " WriteLine(\"Approaching Referable \" + rf);", - " if (Select(\"Submodel\", \"Next\") == null) break;", - "}" - ] - }, - { - "Name": "Test2", - "Lines": [ - "Select(\"Submodel\", \"First\");", - "Sleep(1000);", - "Tool(\"ImportTimeSeries\", ", - " \"Format\", \"Excel\", \"File\", \"Test.xlsx\", ", - " \"ColData\", \"3\" );", - "Sleep(1000);", - "WriteLine(\"Done\");" - ] - }, - { - "Name": "Select Test 3", - "Lines": [ - "Select(\"AAS\", \"Next\");" - ] - }, - { - "Name": "Select Test 4", - "Lines": [ - "Select(\"AAS\", \"Prev\");" - ] - }, - { - "Name": "Test 5", - "Lines": [ - "Tool(\"EditMenu\", \"Mode\", true);", - "res = Tool(\"ToolsFindText\", \"FindText\", \"DE\"); ", - "num = 0;", - "while (res) {", - " x = Select(\"This\"); ", - " WriteLine(num, \":\", x.idShort);", - " num = num + 1;", - " if (num > 18)", - " break;", - " res = Tool(\"ToolsFindForward\");", - " Sleep(200);", - "}" - ] - }, - { - "Name": "Test 6", - "Lines": [ - "Tool(\"EditMenu\", \"Mode\", true);", - "res = Tool(\"ToolsReplaceText\", \"FindText\", \"DE\", \"ReplaceText\", \"GDR\", \"Do\", \"All\"); " - ] - }, - { - "Name": "Test 7", - "Lines": [ - "Tool(\"aas-elem-delete\");" - ] - } - ], - "ScriptLoglevel": 2, - "ScriptLaunchWithoutPrompt": true, - "ScriptExecuteSystem": true - // "ScriptCmd": "WriteLine(\"Hallo\");" - // "ScriptFn" : "test-script.txt" -} +{ + /* "AasxToLoad" : "sample-techdata.aasx", */ + /* "AasxToLoad": "..\\..\\..\\..\\AasxToolkit\\bin\\Debug\\sample.aasx", */ + /* "AasxToLoad": "sample-hsu.aasx", */ + /* "AasxToLoad": "MTPsample.aasx", */ + /* "AasxToLoad": "sample-generated-modified.aasx", */ + /* "AasxToLoad": "..\\..\\..\\..\\..\\..\\aasx-sample-data\\Develop_AAS\\Sample-Fluiddraw.aasx", */ + /* "AasxRepositoryFn": "..\\..\\..\\..\\..\\Sample_AAS\\aasxrepo-new.json", */ + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo\\FestoDemoBox-RepositoryViaHTTP.json", */ + // "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo3\\Festo-DemoBox-repo-local.json", + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\Festo_Demo_Box\\Festo-DemoBox-repo-CPX_E.json", */ + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\new-aasx-repo.json", */ + // "AasxRepositoryFn": "C:\\HOMI\\Develop\\Aasx\\repo_demo_case\\Festo-DemoCase-repo-local.json", + /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\200806_Sample_Repo_with_Fluidic_Plan\\MTPsample.aasx", */ + /* "AasxToLoad": "http://localhost:51310/server/getaasx/0", */ + /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\AasxFesto\\AasxFesto\\AasxFctTool\\bin\\Debug\\net472\\test.aasx", */ + /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\Festo_SPAU_VR3_UA.aasx", */ + /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", */ + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_forV3-spiel.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\00_FestoDemoBox-Module-2-Kopie2.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\IDTA 02003-1-2_Template_TechnicalData.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\SMT_Sample_B.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\IDTA 02006-2-1_Template_Digital Nameplate_V3_lang.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_DPPV2.aasx", + // "AuxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\SMT_Sample_A.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_V3new_spiel1.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3_DPPV2.aasx", + "WindowLeft": 100, + "WindowTop": -1, + "WindowWidth": 900, + "WindowHeight": 600, + "WindowMaximized": false, + "TemplateIdAas": "www.example.com/ids/aas/DDDD_DDDD_DDDD_DDDD", + "TemplateIdAsset": "www.example.com/ids/asset/DDDD_DDDD_DDDD_DDDD", + "TemplateIdSubmodelInstance": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", + "TemplateIdSubmodelTemplate": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", + "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", + "EclassDir": ".\\eclass\\", + /* "LogoFile": "SpecPI40_t.png", */ + "LogoFile": "PI40_and_IDTA.png", + "QualifiersFile": "qualifier-presets.json", + "ExtensionsPresetFile": "extension-presets.json", + "IdentifierKeyValuePairsFile": "local-identifier-presets.json", + "ContentHome": "https://github.com/admin-shell/io/blob/master/README.md", + "UseFlyovers": true, + "SplashTime": 0, + "InternalBrowser": false, + "EclassTwoPass": true, + "BackupDir": ".\\backup", + "BackupFiles": 10, + "RestServerHost": "localhost", + "RestServerPort": "1111", + "WriteDefaultOptionsFN": null /* "options-written.json" */, + "IndirectLoadSave": true, + "AccentColors": {}, + "LoadWithoutPrompt": true, + "ShowIdAsIri": false, + "VerboseConnect": true, + "DefaultStayConnected": true, + "DefaultUpdatePeriod": 1000, + "StayConnectOptions": "REST-QUEUE", // SIM + /* "DefaultConnectRepositoryLocation": "http://localhost:51310", */ + /* "DefaultConnectRepositoryLocation": "http://admin-shell-io.com:51510", */ + /* "DefaultConnectRepositoryLocation": "https://admin-shell-io.com:51711", */ + "DefaultConnectRepositoryLocation": "https://admin-shell-io.com/51711", + "MqttPublisherOptions": { + "BrokerUrl": "192.168.178.97:1883", + "MqttRetain": false, + "EnableFirstPublish": true, + "FirstTopicAAS": "AAS", + "FirstTopicSubmodel": "{aas}/Submodel_{sm}", + "EnableEventPublish": true, + "EventTopic": "Events/aas/{aas}/sm/{sm}/{path}", + "SingleValuePublish": true, + "SingleValueFirstTime": true, + "SingleValueTopic": "Values/aas/{aas}/sm/{sm}/{path}" + }, + "UserDir": ".\\userdata", + "UserName": "miho", + "Remarks": [ + "This JSON file might contain special settings for debugging purposes of Michael Hoffmeisters setup." + ], + "PluginPrefer": "ANYUI", + "PluginDll": [ + /* + { + "Path": "..\\..\\..\\..\\..\\AasxPluginUaNetServer\\bin\\Debug\\net472\\AasxPluginUaNetServer.dll", + "Args": [ + "-single-nodeids", + "-single-keys", + "-ns", + "2", + "-ns", + "3" + ], + "Options": null + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginUaNetClient\\bin\\Debug\\net472\\AasxPluginUaNetClient.dll", + "Args": [], + "Options": null + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net472\\AasxPluginBomStructure.dll", + "Args": [] + }, + { + "Path": "..\\AasxPluginBomStructure\\bin\\Debug\\net6.0-windows\\AasxPluginBomStructure.dll", + "Args": [] + }, + { + "Path": "..\\AasxPluginMtpViewer\\bin\\Debug\\net6.0-windows\\AasxPluginMtpViewer.dll", + "Args": [] + }, + */ + { + "Path": ".\\plugins\\AasxPluginKnownSubmodels\\AasxPluginKnownSubmodels.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginDigitalNameplate\\AasxPluginDigitalNameplate.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginDocumentShelf\\AasxPluginDocumentShelf.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginContactInformation\\AasxPluginContactInformation.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginGenericForms\\AasxPluginGenericForms.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginTechnicalData\\AasxPluginTechnicalData.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginPlotting\\AasxPluginPlotting.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginImageMap\\AasxPluginImageMap.dll", + "Args": [] + }, + { + "Path": ".\\plugins\\AasxPluginExportTable\\AasxPluginExportTable.dll", + "Args": [] + } + // Festo specific from here on + /* , + { + "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawViewer\\bin\\Debug\\net6.0-windows\\AasxPluginFluiddrawViewer.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawBom\\bin\\Debug\\net6.0-windows\\AasxPluginFluiddrawBom.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\net6.0-windows\\AasxPluginWebBrowser.dll", + "Args": [] + } + // Festo specific from here on + { + "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawViewer\\bin\\Debug\\AasxPluginFluiddrawViewer.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawBom\\bin\\Debug\\AasxPluginFluiddrawBom.dll", + "Args": [] + } + */ + ], + "SecureConnectPresets": [ + { + "Name": "Internet Demo", + "Protocol": { + "Value": "Azure", + "Choices": [ + "Unprotected", + "OpenID Connect", + "Azure" + ] + }, + "AuthorizationServer": { + "Value": "http://auth1.phoenix.com", + "Choices": [ + "http://auth2.phoenix.com", + "http://auth1.phoenix.com", + "http://auth3.phoenix.com" + ] + }, + "AasServer": { + "Value": "http://aas2.phoenix.com", + "Choices": [ + "http://aas3.phoenix.com", + "http://aas2.phoenix.com", + "http://aas1.phoenix.com" + ] + }, + "CertificateFile": { + "Value": "wieso.txt", + "Choices": [ + "C:\\FILE1.TXT", + "C:\\FILE2.TXT", + "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" + ] + }, + "Password": { + "Value": "sescret", + "Choices": [ + "geheim", + "hidden", + "Pand0ra" + ] + } + }, + { + "Name": "Only Intranet", + "Protocol": { + "Value": "Unprotected", + "Choices": [ + "Unprotected", + "OpenID Connect", + "Azure" + ] + }, + "AuthorizationServer": { + "Value": "http://auth3.phoenix.com", + "Choices": [ + "http://auth2.phoenix.com", + "http://auth1.phoenix.com", + "http://auth3.phoenix.com" + ] + }, + "AasServer": { + "Value": "http://aas1.phoenix.com", + "Choices": [ + "http://aas3.phoenix.com", + "http://aas2.phoenix.com", + "http://aas1.phoenix.com" + ] + }, + "CertificateFile": { + "Value": "wieso22.txt", + "Choices": [ + "C:\\FILE1.TXT", + "C:\\FILE2.TXT", + "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" + ] + } + } + ], + "IntegratedConnectPresets": [ + { + "Name": "Empty", + "Location": "", + "Username": "", + "Password": "" + }, + { + "Name": "First of admin-shell-io.com", + "Location": "http://admin-shell-io.com:51310/server/getaasx/0", + "Username": "", + "Password": "", + "StayConnected": true + }, + { + "Name": "DEMO", + "Location": "http://demo/", + "Username": "Foo", + "Password": "Bar", + "AutoClose": false + }, + { + "Name": "Long loading of admin-shell-io.com", + "Location": "http://admin-shell-io.com:51410/server/getaasx/3", + "Username": "", + "Password": "", + "StayConnected": true, + "AutoClose": false + }, + { + "Name": "Latest testing", + "Location": "http://admin-shell-io.com:52001/server/getaasx/0", + "Username": "", + "Password": "", + "StayConnected": true, + "AutoClose": false + } + ], + "FontSizePreset": 16, + "ScriptPresets": [ + { + "Name": "Test1", + "Lines": [ + "Select(\"AAS\", \"First\");", + "Sleep(1000);", + "Location(\"Push\");", + "Sleep(1000);", + "Select(\"Submodel\", \"First\");", + "Sleep(1000);", + "while (true) {", + " rf = Select(\"This\");", + " WriteLine(\"Approaching Referable \" + rf);", + " if (Select(\"Submodel\", \"Next\") == null) break;", + "}" + ] + }, + { + "Name": "Test2", + "Lines": [ + "Select(\"Submodel\", \"First\");", + "Sleep(1000);", + "Tool(\"ImportTimeSeries\", ", + " \"Format\", \"Excel\", \"File\", \"Test.xlsx\", ", + " \"ColData\", \"3\" );", + "Sleep(1000);", + "WriteLine(\"Done\");" + ] + }, + { + "Name": "Select Test 3", + "Lines": [ + "Select(\"AAS\", \"Next\");" + ] + }, + { + "Name": "Select Test 4", + "Lines": [ + "Select(\"AAS\", \"Prev\");" + ] + }, + { + "Name": "Test 5", + "Lines": [ + "Tool(\"EditMenu\", \"Mode\", true);", + "res = Tool(\"ToolsFindText\", \"FindText\", \"DE\"); ", + "num = 0;", + "while (res) {", + " x = Select(\"This\"); ", + " WriteLine(num, \":\", x.idShort);", + " num = num + 1;", + " if (num > 18)", + " break;", + " res = Tool(\"ToolsFindForward\");", + " Sleep(200);", + "}" + ] + }, + { + "Name": "Test 6", + "Lines": [ + "Tool(\"EditMenu\", \"Mode\", true);", + "res = Tool(\"ToolsReplaceText\", \"FindText\", \"DE\", \"ReplaceText\", \"GDR\", \"Do\", \"All\"); " + ] + }, + { + "Name": "Test 7", + "Lines": [ + "Tool(\"aas-elem-delete\");" + ] + } + ], + "ScriptLoglevel": 2, + "ScriptLaunchWithoutPrompt": true, + "ScriptExecuteSystem": true + // "ScriptCmd": "WriteLine(\"Hallo\");" + // "ScriptFn" : "test-script.txt" +}