using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol;

namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer;

/// <summary>
/// Factory for creating IDataConnection adapters based on protocol type.
/// Adding a new protocol = implement IDataConnection + register with the factory.
/// </summary>
public interface IDataConnectionFactory
{
    /// <summary>
    /// Creates an IDataConnection adapter for the specified protocol type.
    /// </summary>
    /// <param name="protocolType">Protocol identifier (e.g., "OpcUa").</param>
    /// <param name="connectionDetails">Protocol-specific connection parameters.</param>
    /// <returns>A configured but not yet connected IDataConnection instance.</returns>
    IDataConnection Create(string protocolType, IDictionary<string, string> connectionDetails);
}
