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)); }