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;
using System.Threading.Tasks;
namespace AsbCloudWebApi.Controllers.SAUB
{
///
/// Данные осциллятора и демпфера
///
[Route("api/[controller]")]
[ApiController]
public class TelemetryDataSpinController : TelemetryDataBaseController
{
public TelemetryDataSpinController(
ITelemetryService telemetryService,
ITelemetryDataService telemetryDataService,
IWellService wellService,
IHubContext telemetryHubContext)
: base(
telemetryService,
telemetryDataService,
wellService,
telemetryHubContext)
{}
protected override Task SignalRNotifyAsync(int idWell, IEnumerable dtos, CancellationToken token)
{
return telemetryHubContext.Clients.Group($"well_{idWell}").ReceiveDataSpin(dtos, token);
}
}
}