9cad9ed0fc
v2-ci / build (push) Failing after 41s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>/<param>/<returns>/<inheritdoc> where missing and removes project bookkeeping IDs (task/tracking refs) from shipped code comments, so the docs read cleanly and CommentChecker is quiet except for known false positives (PLC/protocol terms, event/IEqualityComparer inheritdoc). Doc/comment-only; no logic changed; solution builds clean.
18 lines
873 B
C#
18 lines
873 B
C#
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers;
|
|
|
|
/// <summary>
|
|
/// Pure static helper that converts AB Legacy PLC file-type + file-number + element
|
|
/// into the canonical address string (e.g. N7:0).
|
|
/// Extracted so unit tests can call it without bUnit.
|
|
/// </summary>
|
|
public static class AbLegacyAddressBuilder
|
|
{
|
|
/// <summary>Builds the canonical AB Legacy address string from its file-type, file-number, and element parts.</summary>
|
|
/// <param name="fileType">The file-type prefix (e.g. <c>N</c>).</param>
|
|
/// <param name="fileNumber">The file number.</param>
|
|
/// <param name="element">The element index within the file.</param>
|
|
/// <returns>The canonical address string (e.g. <c>N7:0</c>).</returns>
|
|
public static string Build(string fileType, int fileNumber, int element)
|
|
=> $"{fileType}{fileNumber}:{element}";
|
|
}
|