using JiShe.CollectBus.IotSystems.Protocols;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;

namespace JiShe.CollectBus.Protocol.Interfaces
{
    public interface IProtocolService
    {
        /// <summary>
        /// 通过仪器设备型号获取协议信息
        /// </summary>
        /// <param name="deviceCode"></param>
        /// <param name="isSpecial"></param>
        /// <returns></returns>
        /// <exception cref="UserFriendlyException"></exception>
        Task<ProtocolInfo> FirstOrDefaultByDeviceAsync(string deviceCode, bool isSpecial = false);

        /// <summary>
        /// 获取协议池服务
        /// </summary>
        /// <param name="deviceCode"></param>
        /// <param name="isSpecial"></param>
        /// <returns></returns>
        Task<IProtocolPlugin?> GetProtocolServiceAsync(string deviceCode, bool isSpecial = false);
    }
}
