Files
lmxopcua/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy/AbLegacyProbeAddress.cs
T
Joseph Doherty 826312befe docs: fill missing XML docs and strip tracking IDs from src comments
Clears CommentChecker findings in src/ (3,280 -> 209, the remainder being false
positives like PLC-5/IEEE-754/M0.0) by adding missing summaries/params/returns,
normalising inheritdoc usage, and removing Gitea/review tracking IDs while keeping
the rationale they annotated. Comment-only: comment-stripped sources are identical
to the parent commit.
2026-10-15 06:14:58 -04:00

20 lines
1.0 KiB
C#

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.
/// </summary>
internal static class AbLegacyProbeAddress
{
/// <summary>Returns the normalised name, or null when <paramref name="address"/> does not parse for the family.</summary>
/// <param name="address">The configured probe address.</param>
/// <param name="family">The PLC family used to parse the address.</param>
/// <returns>The normalised name, or null when the address does not parse.</returns>
public static string? Normalise(string? address, AbLegacyPlcFamily family) =>
AbLegacyAddress.TryParse(address, family)?.ToLibplctagName();
}