using JiShe.CollectBus.IotSystems.MeterReadingRecords;
using JiShe.ServicePro.IoTDBManagement.TableModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;

namespace JiShe.CollectBus.DataChannels
{
    /// <summary>
    /// 数据通道管理服务
    /// </summary>
    public interface IDataChannelManageService
    {
        #region 下发任务通道

        /// <summary>
        /// 定时任务数据通道写入
        /// </summary>
        /// <returns></returns>
        Task ScheduledMeterTaskWriterAsync(ChannelWriter<ValueTuple<string, List<MeterReadingTelemetryPacketInfo>>> _telemetryPacketInfoWriter, ValueTuple<string, List<MeterReadingTelemetryPacketInfo>> dataItems);

        /// <summary>
        /// 定时任务数据入库和Kafka推送通道
        /// </summary>
        /// <returns></returns>
        Task ScheduledMeterTaskReadingAsync(ChannelReader<ValueTuple<string, List<MeterReadingTelemetryPacketInfo>>> _telemetryPacketInfoReader );
        #endregion
    }
}
