DD.WellWorkover.Cloud/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSpinController.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2022-04-08 13:10:06 +05:00
using AsbCloudApp.Data.SAUB;
using AsbCloudApp.Services;
using AsbCloudWebApi.SignalR;
using AsbCloudWebApi.SignalR.Clients;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using System.Collections.Generic;
using System.Threading;
2023-11-09 15:55:49 +05:00
using System.Threading.Tasks;
2022-04-11 18:00:34 +05:00
namespace AsbCloudWebApi.Controllers.SAUB
{
2022-06-16 17:37:10 +05:00
/// <summary>
/// Данные осциллятора и демпфера
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class TelemetryDataSpinController : TelemetryDataBaseController<TelemetryDataSpinDto>
{
public TelemetryDataSpinController(
ITelemetryService telemetryService,
ITelemetryDataService<TelemetryDataSpinDto> telemetryDataService,
IWellService wellService,
IHubContext<TelemetryHub, ITelemetryHubClient> telemetryHubContext)
: base(
telemetryService,
telemetryDataService,
wellService,
telemetryHubContext)
2023-11-09 15:55:49 +05:00
{}
protected override Task SignalRNotifyAsync(int idWell, IEnumerable<TelemetryDataSpinDto> dtos, CancellationToken token)
{
2023-11-09 15:55:49 +05:00
return telemetryHubContext.Clients.Group($"well_{idWell}").ReceiveDataSpin(dtos, token);
}
}
}