48bd266e19
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
21 lines
1.0 KiB
C#
21 lines
1.0 KiB
C#
using Opc.Ua;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Client.Shared.Adapters;
|
|
|
|
/// <summary>
|
|
/// Abstracts OPC UA endpoint discovery for testability.
|
|
/// </summary>
|
|
internal interface IEndpointDiscovery
|
|
{
|
|
/// <summary>
|
|
/// Discovers endpoints at the given URL and returns the best match for the requested security mode.
|
|
/// Also rewrites the endpoint URL hostname to match the requested URL when they differ.
|
|
/// </summary>
|
|
/// <param name="config">The OPC UA application configuration.</param>
|
|
/// <param name="endpointUrl">The endpoint URL to discover.</param>
|
|
/// <param name="requestedMode">The requested message security mode.</param>
|
|
/// <param name="ct">Cancellation token.</param>
|
|
/// <returns>The best-matching endpoint description, with its URL hostname rewritten to match <paramref name="endpointUrl"/> when they differ.</returns>
|
|
Task<EndpointDescription> SelectEndpointAsync(ApplicationConfiguration config, string endpointUrl,
|
|
MessageSecurityMode requestedMode, CancellationToken ct = default);
|
|
} |