From 479c43c828d6074a869e0e6401fd9c99996770bc Mon Sep 17 00:00:00 2001 From: barnstee Date: Sat, 19 Oct 2024 21:09:03 -0700 Subject: [PATCH] Bug fixes. --- src/OPCUAViewer/I4AASNodeManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OPCUAViewer/I4AASNodeManager.cs b/src/OPCUAViewer/I4AASNodeManager.cs index 2cd64f0e..ecb52f76 100644 --- a/src/OPCUAViewer/I4AASNodeManager.cs +++ b/src/OPCUAViewer/I4AASNodeManager.cs @@ -375,7 +375,7 @@ public NodeState CreateObject(NodeState parent, AssetAdministrationShellEnvironm CreateVariable(o, "Identification", c_identifiableTypeNodeId, aas.Id); CreateVariable(o, "Administration", c_administrationNodeId, aas.Administration?.ToString()); - if (aas.EmbeddedDataSpecifications != null && aas.EmbeddedDataSpecifications != null) + if (aas.EmbeddedDataSpecifications != null) { foreach (var ds in aas.EmbeddedDataSpecifications) { @@ -392,9 +392,9 @@ public NodeState CreateObject(NodeState parent, AssetAdministrationShellEnvironm if (aas.Submodels != null && aas.Submodels.Count > 0) { - foreach (var smr in aas.Submodels) + for (int i = 0; i < aas.Submodels.Count; i++) { - CreateVariable(o, "Submodel", c_submodelNodeId, smr.ToString()); + CreateVariable(o, "Submodel_" + i.ToString(), c_submodelNodeId, aas.Submodels[i].Keys[0].Value); } }