feat(opcua): add ISurgicalAddressSpaceSink + node-manager in-place tag-attribute update (F10b)

This commit is contained in:
Joseph Doherty
2026-06-18 13:32:53 -04:00
parent acc6a64b26
commit 3fc258bd42
3 changed files with 59 additions and 4 deletions
@@ -8,7 +8,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <see cref="OtOpcUaNodeManager"/>. The host wires this in once the StandardServer has
/// been started (so the node manager exists).
/// </summary>
public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink
public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink, ISurgicalAddressSpaceSink
{
private readonly OtOpcUaNodeManager _nodeManager;
@@ -65,6 +65,14 @@ public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink
public void EnsureVariable(string variableNodeId, string? parentFolderNodeId, string displayName, string dataType, bool writable, string? historianTagname = null, bool isArray = false, uint? arrayLength = null)
=> _nodeManager.EnsureVariable(variableNodeId, parentFolderNodeId, displayName, dataType, writable, historianTagname, isArray, arrayLength);
/// <summary>F10b: surgically update an existing variable node's Writable + Historizing in place
/// (no rebuild). Returns false when the node does not exist (caller falls back to a full rebuild).</summary>
/// <param name="variableNodeId">The variable node identifier.</param>
/// <param name="writable">When true the node becomes read/write with the inbound-write handler; otherwise read-only.</param>
/// <param name="historianTagname">null ⇒ not historized; non-null ⇒ Historizing with the HistoryRead bit and tagname binding.</param>
public bool UpdateTagAttributes(string variableNodeId, bool writable, string? historianTagname)
=> _nodeManager.UpdateTagAttributes(variableNodeId, writable, historianTagname);
/// <summary>Rebuilds the entire OPC UA address space.</summary>
public void RebuildAddressSpace() => _nodeManager.RebuildAddressSpace();
}