forked from ddrilling/AsbCloudServer
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
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;
|
|
|
|
/// <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)
|
|
{}
|
|
|
|
protected override Task SignalRNotifyAsync(int idWell, IEnumerable<TelemetryDataSpinDto> dtos, CancellationToken token)
|
|
{
|
|
return telemetryHubContext.Clients.Group($"well_{idWell}").ReceiveDataSpin(dtos, token);
|
|
}
|
|
}
|