From 8ea7bdd15b8ec402e63b8a4a83738c70d3e33723 Mon Sep 17 00:00:00 2001 From: barnstee Date: Sat, 19 Oct 2024 21:15:45 -0700 Subject: [PATCH] Added OPC UA variables for submodel definitions. --- src/OPCUAViewer/I4AASNodeManager.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/OPCUAViewer/I4AASNodeManager.cs b/src/OPCUAViewer/I4AASNodeManager.cs index ecb52f76..151026ae 100644 --- a/src/OPCUAViewer/I4AASNodeManager.cs +++ b/src/OPCUAViewer/I4AASNodeManager.cs @@ -394,7 +394,15 @@ public NodeState CreateObject(NodeState parent, AssetAdministrationShellEnvironm { for (int i = 0; i < aas.Submodels.Count; i++) { - CreateVariable(o, "Submodel_" + i.ToString(), c_submodelNodeId, aas.Submodels[i].Keys[0].Value); + CreateVariable(o, "Submodel Reference " + i.ToString(), c_submodelNodeId, aas.Submodels[i].Keys[0].Value); + } + } + + if (env.Submodels != null && env.Submodels.Count > 0) + { + for (int i = 0; i < env.Submodels.Count; i++) + { + CreateVariable(o, "Submodel Definition " + i.ToString(), c_submodelNodeId, env.Submodels[i].IdShort); } }