refactor: migrate OPC UA server SDK 2.0 compilation and boundaries
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user