namespace PlcSiemens.O
{
    public interface IIsoSender
    {
        /// <summary>
        /// 不含ISO头的请求
        /// </summary>
        /// <typeparam name="TRequest"></typeparam>
        /// <typeparam name="TResponse"></typeparam>
        /// <param name="request"></param>
        /// <returns></returns>
        TResponse Send<TRequest, TResponse>(TRequest request)
            where TResponse : IBuildResponse, new()
            where TRequest : IBuildRequest, new();

        /// <summary>
        /// 包含ISO头的请求
        /// </summary>
        /// <typeparam name="TRequest"></typeparam>
        /// <typeparam name="TResponse"></typeparam>
        /// <param name="request"></param>
        /// <returns></returns>
        TResponse IsoSend<TRequest, TResponse>(TRequest request)
            where TResponse : IBuildResponse, new()
            where TRequest : IBuildRequest, new();
    }
}
