From 349139939c8eaa0d8b61bc4f423cfe1f801da42e Mon Sep 17 00:00:00 2001 From: AlinMoldovean Date: Tue, 18 Jul 2017 15:58:49 +0300 Subject: [PATCH] Compliance fix for GetMonitoredItems.OutputArguments.ValueRank. --- .../Diagnostics/DiagnosticsNodeManager.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/SampleApplications/SDK/Opc.Ua.Server/Diagnostics/DiagnosticsNodeManager.cs b/SampleApplications/SDK/Opc.Ua.Server/Diagnostics/DiagnosticsNodeManager.cs index e1e7ae478a..bf54829276 100644 --- a/SampleApplications/SDK/Opc.Ua.Server/Diagnostics/DiagnosticsNodeManager.cs +++ b/SampleApplications/SDK/Opc.Ua.Server/Diagnostics/DiagnosticsNodeManager.cs @@ -154,6 +154,25 @@ namespace Opc.Ua.Server getMonitoredItems.OnCallMethod = OnGetMonitoredItems; } + // set ValueRank for GetMonitoredItems.OutputArguments.Value. + PropertyState getMonitoredItemsOutputArguments = (PropertyState)FindPredefinedNode( + VariableIds.Server_GetMonitoredItems_OutputArguments, + typeof(PropertyState)); + + if (getMonitoredItemsOutputArguments != null) + { + Argument[] outputArgumentsValue = (Argument[])getMonitoredItemsOutputArguments.Value; + + if (outputArgumentsValue != null) + { + foreach (Argument argument in outputArgumentsValue) + { + argument.ArrayDimensions = new UInt32Collection { 0 }; + } + + getMonitoredItemsOutputArguments.ClearChangeMasks(SystemContext, false); + } + } } }