feat(commons): add surgical remove members to ISurgicalAddressSpaceSink + deferred forwarding (guard-verified) (R2-07 T7)

This commit is contained in:
Joseph Doherty
2026-07-13 12:07:01 -04:00
parent 4f1853b21f
commit 438004e371
9 changed files with 210 additions and 1 deletions
@@ -1746,6 +1746,19 @@ public sealed class OtOpcUaNodeManager : CustomNodeManager2
}
}
// R2-07 Phase 2 (T7 placeholder) — surgical single-node / subtree removal. These return false (the
// rebuild-fallback contract) so the tree stays shippable at T7 while T8/T9/T10 implement the real
// in-place teardown (mirroring the per-node loops inside RebuildAddressSpace, scoped to the id/subtree,
// with a NodeDeleted model-change reported outside Lock). Implemented in T8/T9/T10.
/// <inheritdoc cref="ISurgicalAddressSpaceSink.RemoveVariableNode"/>
public bool RemoveVariableNode(string variableNodeId) => false;
/// <inheritdoc cref="ISurgicalAddressSpaceSink.RemoveAlarmConditionNode"/>
public bool RemoveAlarmConditionNode(string alarmNodeId) => false;
/// <inheritdoc cref="ISurgicalAddressSpaceSink.RemoveEquipmentSubtree"/>
public bool RemoveEquipmentSubtree(string equipmentNodeId) => false;
private FolderState ResolveParentFolder(string? parentNodeId)
{
EnsureAddressSpaceCreated();
@@ -48,6 +48,18 @@ public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink, ISurgicalAddre
public bool UpdateFolderDisplayName(string folderNodeId, string displayName)
=> _nodeManager.UpdateFolderDisplayName(folderNodeId, displayName);
/// <inheritdoc />
public bool RemoveVariableNode(string variableNodeId)
=> _nodeManager.RemoveVariableNode(variableNodeId);
/// <inheritdoc />
public bool RemoveAlarmConditionNode(string alarmNodeId)
=> _nodeManager.RemoveAlarmConditionNode(alarmNodeId);
/// <inheritdoc />
public bool RemoveEquipmentSubtree(string equipmentNodeId)
=> _nodeManager.RemoveEquipmentSubtree(equipmentNodeId);
/// <inheritdoc />
public void RebuildAddressSpace() => _nodeManager.RebuildAddressSpace();