forked from ddrilling/AsbCloudServer
58 lines
2.2 KiB
C#
58 lines
2.2 KiB
C#
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Requests;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Services
|
|
{
|
|
/// <summary>
|
|
/// сервис данных тех. процесса
|
|
/// </summary>
|
|
/// <typeparam name="TDto"></typeparam>
|
|
public interface ITelemetryDataService<TDto> where TDto : ITelemetryData
|
|
{
|
|
|
|
/// <summary>
|
|
/// получить данные тех. процесса
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="dateBegin"></param>
|
|
/// <param name="intervalSec"></param>
|
|
/// <param name="approxPointsCount">кол-во элементов до которых эти данные прореживаются</param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<TDto>> GetAsync(int idWell,
|
|
DateTime dateBegin = default, double intervalSec = 600d,
|
|
int approxPointsCount = 1024, CancellationToken token = default);
|
|
|
|
/// <summary>
|
|
/// Получить данные тех. процесса
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<TDto>> GetAsync(int idWell, TelemetryDataRequest request, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получение периода за период
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="start"></param>
|
|
/// <param name="end"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
DatesRangeDto? GetRange(int idWell, DateTimeOffset start, DateTimeOffset end);
|
|
|
|
/// <summary>
|
|
/// добавить/изменить данные тех. процесса (используется панелью)
|
|
/// </summary>
|
|
/// <param name="uid"></param>
|
|
/// <param name="dtos"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> UpdateDataAsync(string uid, IEnumerable<TDto> dtos, CancellationToken token);
|
|
}
|
|
} |