feat(otopcua): set Modbus/S7/Galaxy re-discovery policy to Once + Once-branch test (follow-up B)

This commit is contained in:
Joseph Doherty
2026-06-26 12:26:28 -04:00
parent a378b572af
commit efbdaf853c
4 changed files with 34 additions and 0 deletions
@@ -584,6 +584,15 @@ public sealed class GalaxyDriver
// ===== ITagDiscovery (PR 4.1) =====
/// <summary>
/// Run-once: <see cref="DiscoverAsync"/> fetches the full Galaxy hierarchy inline and
/// streams the complete node set within a single awaited call — there is no FOCAS-style
/// background cache that fills in after connect. Galaxy is a heavy network driver, so the
/// bounded post-connect retry loop is deliberately avoided; re-discovery on Galaxy
/// redeploy is handled separately via <see cref="IRediscoverable"/> + the deploy-event watcher.
/// </summary>
public DiscoveryRediscoverPolicy RediscoverPolicy => DiscoveryRediscoverPolicy.Once;
/// <inheritdoc />
public async Task DiscoverAsync(IAddressSpaceBuilder builder, CancellationToken cancellationToken)
{
@@ -261,6 +261,13 @@ public sealed class ModbusDriver
// ---- ITagDiscovery ----
/// <summary>
/// Run-once: <see cref="DiscoverAsync"/> emits the complete node set synchronously from
/// the configured tag table in a single pass — nothing fills in asynchronously after
/// connect, so a single discovery pass is sufficient.
/// </summary>
public DiscoveryRediscoverPolicy RediscoverPolicy => DiscoveryRediscoverPolicy.Once;
/// <summary>Discovers tags and builds the OPC UA address space.</summary>
/// <param name="builder">Address space builder.</param>
/// <param name="cancellationToken">Cancellation token.</param>
@@ -1133,6 +1133,13 @@ public sealed class S7Driver
// ---- ITagDiscovery ----
/// <summary>
/// Run-once: <see cref="DiscoverAsync"/> emits the complete node set synchronously from
/// the configured tag table in a single pass — nothing fills in asynchronously after
/// connect, so a single discovery pass is sufficient.
/// </summary>
public DiscoveryRediscoverPolicy RediscoverPolicy => DiscoveryRediscoverPolicy.Once;
/// <summary>Discovers tags and builds the OPC UA address space.</summary>
/// <param name="builder">Address space builder.</param>
/// <param name="cancellationToken">Cancellation token.</param>