2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data.SAUB;
|
2021-09-17 16:24:01 +05:00
|
|
|
using AsbCloudApp.Services;
|
|
|
|
using AsbCloudWebApi.SignalR;
|
2023-11-09 15:18:07 +05:00
|
|
|
using AsbCloudWebApi.SignalR.Clients;
|
2021-09-17 16:24:01 +05:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.SignalR;
|
2023-11-09 15:18:07 +05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
2023-11-09 15:55:49 +05:00
|
|
|
using System.Threading.Tasks;
|
2021-09-17 16:24:01 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
namespace AsbCloudWebApi.Controllers.SAUB;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Данные осциллятора и демпфера
|
|
|
|
/// </summary>
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
[ApiController]
|
|
|
|
public class TelemetryDataSpinController : TelemetryDataBaseController<TelemetryDataSpinDto>
|
2021-09-17 16:24:01 +05:00
|
|
|
{
|
2024-08-19 10:01:07 +05:00
|
|
|
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
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
protected override Task SignalRNotifyAsync(int idWell, IEnumerable<TelemetryDataSpinDto> dtos, CancellationToken token)
|
|
|
|
{
|
|
|
|
return telemetryHubContext.Clients.Group($"well_{idWell}").ReceiveDataSpin(dtos, token);
|
2021-09-17 16:24:01 +05:00
|
|
|
}
|
|
|
|
}
|