refactor: migrate OPC UA server SDK 2.0 compilation and boundaries

This commit is contained in:
Joseph Doherty
2026-11-10 10:04:14 -05:00
parent d2076e75c6
commit 9af1a824b3
14 changed files with 416 additions and 451 deletions
@@ -27,6 +27,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// </remarks>
internal static class AdvertisedAggregateFunctions
{
private static readonly object SyncGate = new();
/// <summary>Every standard aggregate-function NodeId the SDK's nodeset knows (<c>ObjectIds.AggregateFunction_*</c>).</summary>
private static readonly NodeId[] StandardAggregateIds = typeof(ObjectIds)
.GetFields(BindingFlags.Public | BindingFlags.Static)
@@ -56,10 +57,10 @@ internal static class AdvertisedAggregateFunctions
/// <returns>The advertised NodeIds, or <c>null</c> when the diagnostics node manager or folder is not available.</returns>
public static IReadOnlyList<NodeId>? Apply(IServerInternal server, IReadOnlySet<HistoryAggregateType> served)
{
if (server?.DiagnosticsNodeManager is not CustomNodeManager2 diagnostics) return null;
if (server?.DiagnosticsNodeManager is not DiagnosticsNodeManager diagnostics) return null;
var advertised = new List<NodeId>();
lock (diagnostics.Lock)
lock (SyncGate)
{
var folder = diagnostics.FindPredefinedNode<BaseObjectState>(Folder);
if (folder is null) return null;