diff --git a/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/IOpcUaClient.cs b/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/IOpcUaClient.cs index f1c6c8bb..ee7860cb 100644 --- a/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/IOpcUaClient.cs +++ b/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/IOpcUaClient.cs @@ -1,3 +1,5 @@ +using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol; + namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Adapters; /// @@ -102,6 +104,19 @@ public interface IOpcUaClient : IAsyncDisposable /// becomes unreachable. The adapter layer uses this to trigger reconnection. /// event Action? ConnectionLost; + + /// + /// Enumerates the immediate children of + /// (or the server's ObjectsFolder when null). Throws + /// when the session is not + /// currently up. + /// + /// Node id whose children to browse, or null for the server root. + /// A cancellation token that can be used to cancel the operation. + /// A task that completes with the immediate children of the requested node. + Task BrowseChildrenAsync( + string? parentNodeId, + CancellationToken cancellationToken = default); } /// @@ -180,6 +195,11 @@ internal class StubOpcUaClient : IOpcUaClient return Task.FromResult(0); // Good status } + /// + public Task BrowseChildrenAsync( + string? parentNodeId, CancellationToken cancellationToken = default) + => throw new NotImplementedException(); + /// public ValueTask DisposeAsync() { diff --git a/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/RealOpcUaClient.cs b/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/RealOpcUaClient.cs index 9feb0924..86b5f077 100644 --- a/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/RealOpcUaClient.cs +++ b/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/Adapters/RealOpcUaClient.cs @@ -325,6 +325,12 @@ public class RealOpcUaClient : IOpcUaClient string.IsNullOrWhiteSpace(configured) ? Path.Combine(Path.GetTempPath(), "ScadaBridge", "pki", fallbackLeaf) : configured; + + /// + // Real implementation lands in Task 8 of the OPC UA tag browser plan. + public Task BrowseChildrenAsync( + string? parentNodeId, CancellationToken cancellationToken = default) + => throw new NotImplementedException(); } ///