forked from ddrilling/AsbCloudServer
ca969c99ad
Replace source for DatesRange from db to telemetry tracker.
40 lines
1.6 KiB
C#
40 lines
1.6 KiB
C#
using AsbCloudApp.Data;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Services
|
|
{
|
|
public interface ITelemetryService
|
|
{
|
|
ITimeZoneService TimeZoneService { get; }
|
|
ITelemetryTracker TelemetryTracker { get; }
|
|
|
|
int? GetIdWellByTelemetryUid(string uid);
|
|
int GetOrCreateTelemetryIdByUid(string uid);
|
|
double GetTimezoneOffsetByTelemetryId(int idTelemetry);
|
|
Task<double?> GetTelemetryTimeZoneOffsetAsync(int idTelemetry, CancellationToken token);
|
|
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
|
|
DateTime GetLastTelemetryDate(string telemetryUid);
|
|
DateTime GetLastTelemetryDate(int telemetryId);
|
|
int? GetIdTelemetryByIdWell(int idWell);
|
|
|
|
Task UpdateInfoAsync(string uid, TelemetryInfoDto info, CancellationToken token);
|
|
Task<DatesRangeDto> DatesRangeToTelemetryTimeZoneAsync(int telemetryId, DatesRangeDto result,
|
|
CancellationToken token);
|
|
|
|
Task UpdateTimeZoneAsync(string uid, TelemetryTimeZoneDto telemetryTimeZoneInfo, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Слить данные телеметрии в одну
|
|
/// </summary>
|
|
/// <param name="from">старая (исходная)</param>
|
|
/// <param name="to">новая</param>
|
|
/// <returns></returns>
|
|
Task<int> MergeAsync(int from, int to, CancellationToken token);
|
|
|
|
void SaveRequestDate(string uid, DateTime remoteDate);
|
|
Task<DatesRangeDto> GetDatesRangeAsync(int idWell, bool isUtc, CancellationToken token = default);
|
|
}
|
|
} |