fix(ablegacy): Test Connect normalises the probe address like the driver (#660)
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.PlcFamilies;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy;
|
||||
|
||||
/// <summary>
|
||||
/// The single authority that turns an operator-authored probe address into the name handed to the tag
|
||||
/// factory: family-aware parse (PLC-5 <c>I:</c>/<c>O:</c> octal indices become decimal) then
|
||||
/// <see cref="AbLegacyAddress.ToLibplctagName"/> — the same normalisation tag paths get. Shared by the
|
||||
/// driver's probe loop and the Test Connect probe (#660).
|
||||
/// </summary>
|
||||
internal static class AbLegacyProbeAddress
|
||||
{
|
||||
/// <summary>Returns the normalised name, or null when <paramref name="address"/> does not parse for the family.</summary>
|
||||
public static string? Normalise(string? address, AbLegacyPlcFamily family) =>
|
||||
AbLegacyAddress.TryParse(address, family)?.ToLibplctagName();
|
||||
}
|
||||
Reference in New Issue
Block a user