public FlatReportDto TimeSeriesFlatReport(SinkAndNetworkDto sinkAndNetwork, DateTime date) { var telemetryDataSink = _telemetryDataSinkProcessor.WorkerTelemetryDataSink(sinkAndNetwork.SinkName, sinkAndNetwork.NetworkId); if (telemetryDataSink == null) { return(null); } var devices = _networkOperations.ListDevices(sinkAndNetwork.NetworkId); var telemetryDataList = ((ITelemetryDataSinkTimeSeries)telemetryDataSink).GetTimeSeries(devices.Select(d => d.Id), date.Date); return(FlatDtoConverters.TimeSeriesReport(devices, telemetryDataList)); }
public FlatReportDto CurrentDataFlatReport(SinkAndNetworkDto sinkAndNetwork) { var telemetryDataSink = _telemetryDataSinkProcessor.WorkerTelemetryDataSink(sinkAndNetwork.SinkName, sinkAndNetwork.NetworkId); if (telemetryDataSink == null) { return(null); } var devices = _networkOperations.ListDevices(sinkAndNetwork.NetworkId); var telemetryDataList = ((ITelemetryDataSinkCurrent)telemetryDataSink).GetCurrentData(devices.Select(d => d.Id)); return(FlatDtoConverters.CurrentDataReport(devices, telemetryDataList)); }
public FlatReportDto TimeSeriesFlatReport(SinkAndDeviceDto sinkAndDevice, DateTime date) { var device = _deviceOperations.Get(sinkAndDevice.DeviceId); var telemetryDataSink = _telemetryDataSinkProcessor.WorkerTelemetryDataSink(sinkAndDevice.SinkName, device.NetworkId); if (telemetryDataSink == null) { return(null); } var devices = new[] { new Small { Id = device.Id, Name = device.Name } }; var telemetryDataList = ((ITelemetryDataSinkTimeSeries)telemetryDataSink).GetTimeSeries(devices.Select(d => d.Id), date.Date); return(FlatDtoConverters.TimeSeriesReport(devices, telemetryDataList)); }
public FlatReportDto CurrentDataFlatReport(SinkAndDeviceDto sinkAndDevice) { var device = _deviceOperations.Get(sinkAndDevice.DeviceId); var telemetryDataSink = _telemetryDataSinkProcessor.WorkerTelemetryDataSink(sinkAndDevice.SinkName, device.NetworkId); if (telemetryDataSink == null) { return(null); } var devices = new[] { new Small { Id = device.Id, Name = device.Name } }; var telemetryDataList = ((ITelemetryDataSinkCurrent)telemetryDataSink).GetCurrentData(devices.Select(d => d.Id)); return(FlatDtoConverters.CurrentDataReport(devices, telemetryDataList)); }