feat(dcl): BrowseNext continuation paging + StubOpcUaClient canned browse (T15)

This commit is contained in:
Joseph Doherty
2026-06-18 02:21:59 -04:00
parent 3c9122bc07
commit 2cfe0de927
8 changed files with 258 additions and 37 deletions
@@ -254,11 +254,17 @@ public class MxGatewayDataConnection : IDataConnection, IBrowsableDataConnection
}
/// <inheritdoc />
public async Task<BrowseChildrenResult> BrowseChildrenAsync(string? parentNodeId, CancellationToken cancellationToken = default)
public async Task<BrowseChildrenResult> BrowseChildrenAsync(
string? parentNodeId,
string? continuationToken = null,
CancellationToken cancellationToken = default)
{
if (_status != ConnectionHealth.Connected || _client is null)
throw new ConnectionNotConnectedException($"MxGateway connection is not connected (status: {_status}).");
// MxGateway browse is not pageable — the gateway returns a single,
// already-bounded child set per node. Any continuation token is ignored
// and no continuation is ever surfaced (ContinuationToken stays null).
var (children, truncated) = await _client.BrowseChildrenAsync(parentNodeId, cancellationToken);
var nodes = children
.Select(c => new BrowseNode(c.NodeId, c.DisplayName, c.NodeClass, c.HasChildren))