diff --git a/services/JiShe.CollectBus.Application.Contracts/DataChannels/IDataChannelManageService.cs b/services/JiShe.CollectBus.Application.Contracts/DataChannels/IDataChannelManageService.cs new file mode 100644 index 0000000..150b6f9 --- /dev/null +++ b/services/JiShe.CollectBus.Application.Contracts/DataChannels/IDataChannelManageService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.DataChannels +{ + /// + /// 数据通道管理服务 + /// + public interface IDataChannelManageService + { + } +} diff --git a/services/JiShe.CollectBus.Application/DataChannels/DataChannelManageService.cs b/services/JiShe.CollectBus.Application/DataChannels/DataChannelManageService.cs new file mode 100644 index 0000000..03cb24f --- /dev/null +++ b/services/JiShe.CollectBus.Application/DataChannels/DataChannelManageService.cs @@ -0,0 +1,50 @@ +using JiShe.CollectBus.Application.Contracts; +using JiShe.CollectBus.Common; +using JiShe.CollectBus.IoTDB.Context; +using JiShe.CollectBus.IoTDB.Interface; +using JiShe.CollectBus.Kafka.Internal; +using JiShe.CollectBus.Kafka.Producer; +using JiShe.CollectBus.Protocol.Interfaces; +using JiShe.CollectBus.Protocol.Services; +using JiShe.CollectBus.RedisDataCache; +using JiShe.CollectBus.ScheduledMeterReading; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.DataChannels +{ + /// + /// 数据通道管理服务 + /// + public class DataChannelManageService: CollectBusAppService, IDataChannelManageService + { + private readonly ILogger _logger; + private readonly IIoTDbProvider _dbProvider; + private readonly IProducerService _producerService; + private readonly KafkaOptionConfig _kafkaOptions; + private readonly ServerApplicationOptions _applicationOptions; + private readonly IoTDBRuntimeContext _runtimeContext; + + public DataChannelManageService( + ILogger logger, + IIoTDbProvider dbProvider, + IoTDBRuntimeContext runtimeContext, + IProducerService producerService, + IOptions kafkaOptions, + IOptions applicationOptions) + { + _logger = logger; + _dbProvider = dbProvider; + _runtimeContext = runtimeContext; + _producerService = producerService; + _kafkaOptions = kafkaOptions.Value; + _applicationOptions = applicationOptions.Value; + _runtimeContext.UseTableSessionPool = true; + } + } +}