Merge B1-ablegacy: v3 RawPath read-path

This commit is contained in:
Joseph Doherty
2026-07-15 20:20:49 -04:00
22 changed files with 458 additions and 287 deletions
@@ -1,4 +1,5 @@
using CliFx.Attributes;
using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
using ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.PlcFamilies;
using ZB.MOM.WW.OtOpcUa.Driver.Cli.Common;
@@ -37,7 +38,12 @@ public abstract class AbLegacyCommandBase : DriverCommandBase
/// <summary>
/// Build an <see cref="AbLegacyDriverOptions"/> with the device + tag list a subclass
/// supplies. Probe disabled for CLI one-shot runs.
/// supplies. The CLI authors typed <see cref="AbLegacyTagDefinition"/>s from operator flags;
/// v3 delivers tags to the driver as <see cref="RawTagEntry"/> records, so each typed def is
/// serialised back to its <c>TagConfig</c> blob via
/// <see cref="AbLegacyTagDefinitionFactory.ToTagConfig"/> (RawPath = the def's <c>Name</c>,
/// DeviceName = the def's <c>DeviceHostAddress</c> — the CLI's single device). Probe disabled
/// for CLI one-shot runs.
/// </summary>
/// <param name="tags">The tag definitions to include in the options.</param>
/// <returns>Configured AB Legacy driver options.</returns>
@@ -47,7 +53,8 @@ public abstract class AbLegacyCommandBase : DriverCommandBase
HostAddress: Gateway,
PlcFamily: PlcType,
DeviceName: $"cli-{PlcType}")],
Tags = tags,
RawTags = [.. tags.Select(t => new RawTagEntry(
t.Name, AbLegacyTagDefinitionFactory.ToTagConfig(t), t.WriteIdempotent, DeviceName: t.DeviceHostAddress))],
Timeout = Timeout,
Probe = new AbLegacyProbeOptions { Enabled = false },
};