feat(abcip): final review I1 — node-level Drivers:AbCip:DefaultTransport
The old AdminUI cannot author the per-driver transport key (#576), so the 'pin before upgrading' recipe had no working path. A node-level appsetting (env Drivers__AbCip__DefaultTransport) now supplies the default for AbCip drivers with no key: explicit key > node default > compiled Native. Bound and validated unconditionally (bad value fails host start); the driver factory and the Test Connect probe both read it so they agree. AbCip.md upgrade recipe rewritten around the key; Configuration.md documents it. Also documents first-wins for AllowPacking/probe and host-alias throttles (final review M6) and moves the status-bit note out of AbCip.md (M5). Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -34,11 +34,22 @@ public sealed class AbCipDriverProbe : IDriverProbe
|
||||
};
|
||||
|
||||
private readonly IAbCipTagFactory? _tagFactory;
|
||||
private readonly AbCipTransport _defaultTransport;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="AbCipDriverProbe"/> class.</summary>
|
||||
/// <param name="tagFactory">Factory for the probe's tag runtime; when null the config's
|
||||
/// <c>Transport</c> selects the native or libplctag-backed one.</param>
|
||||
public AbCipDriverProbe(IAbCipTagFactory? tagFactory = null) => _tagFactory = tagFactory;
|
||||
/// <param name="defaultTransport">The node-level default for a config with no <c>transport</c> key — the
|
||||
/// SAME value the node's driver factory uses, so Test Connect probes the stack the driver would run.</param>
|
||||
public AbCipDriverProbe(IAbCipTagFactory? tagFactory = null,
|
||||
AbCipTransport defaultTransport = AbCipTransportResolver.Default)
|
||||
{
|
||||
_tagFactory = tagFactory;
|
||||
_defaultTransport = defaultTransport;
|
||||
}
|
||||
|
||||
/// <summary>The node-level default this probe resolves an absent key to (wiring tests).</summary>
|
||||
public AbCipTransport DefaultTransport => _defaultTransport;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string DriverType => "AbCip";
|
||||
@@ -123,7 +134,7 @@ public sealed class AbCipDriverProbe : IDriverProbe
|
||||
ConnectionSize: firstDevice?.ConnectionSize ?? profile.DefaultConnectionSize,
|
||||
UseConnectedMessaging: profile.SupportsConnectedMessaging);
|
||||
|
||||
var rt = (_tagFactory ?? AbCipTransportFactories.For(AbCipTransportResolver.Resolve(opts)).Tags).Create(p);
|
||||
var rt = (_tagFactory ?? AbCipTransportFactories.For(AbCipTransportResolver.Resolve(opts, _defaultTransport)).Tags).Create(p);
|
||||
try
|
||||
{
|
||||
await rt.InitializeAsync(cts.Token);
|
||||
|
||||
Reference in New Issue
Block a user