2021-09-17 16:24:01 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2023-01-13 14:34:26 +05:00
|
|
|
|
|
2022-11-15 17:44:48 +05:00
|
|
|
|
#nullable enable
|
2021-09-17 16:24:01 +05:00
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// сервис данных тех. процесса
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TDto"></typeparam>
|
2021-09-17 16:24:01 +05:00
|
|
|
|
public interface ITelemetryDataService<TDto> where TDto : ITelemetryData
|
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// получить данные тех. процесса
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="dateBegin"></param>
|
|
|
|
|
/// <param name="intervalSec"></param>
|
|
|
|
|
/// <param name="approxPointsCount">кол-во элементов до которых эти данные прореживаются</param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-11-15 17:44:48 +05:00
|
|
|
|
Task<IEnumerable<TDto>?> GetOrDefaultAsync(int idWell,
|
2021-11-18 11:24:21 +05:00
|
|
|
|
DateTime dateBegin = default, double intervalSec = 600d,
|
2022-01-05 17:50:45 +05:00
|
|
|
|
int approxPointsCount = 1024, CancellationToken token = default);
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// добавить/изменить данные тех. процесса (используется панелью)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uid"></param>
|
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-01-13 14:34:26 +05:00
|
|
|
|
Task<int> UpdateDataAsync(string uid, IEnumerable<TDto> dtos, CancellationToken token);
|
2021-09-17 16:24:01 +05:00
|
|
|
|
}
|
2022-11-15 17:44:48 +05:00
|
|
|
|
}
|
|
|
|
|
#nullable disable
|