-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Measurements with multiple trackers
- Loading branch information
Showing
9 changed files
with
103 additions
and
390 deletions.
There are no files selected for viewing
72 changes: 13 additions & 59 deletions
72
CentralHub.Api.Model/Responses/Measurements/AggregatedMeasurements.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,21 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace CentralHub.Api.Model.Responses.AggregatedMeasurements; | ||
|
||
public sealed class AggregatedMeasurements | ||
namespace CentralHub.Api.Model.Responses.Measurements; | ||
|
||
[method: JsonConstructor] | ||
public sealed class AggregatedMeasurements(int aggregatedMeasurementsId, | ||
DateTime startTime, | ||
DateTime endTime, | ||
int bluetoothCount, | ||
int wifiCount) | ||
{ | ||
[JsonConstructor] | ||
public AggregatedMeasurements( | ||
int aggregatedMeasurementDtoId, | ||
DateTime startTime, | ||
DateTime endTime, | ||
int measurementGroupCount, | ||
int bluetoothMedian, | ||
double bluetoothMean, | ||
int bluetoothMin, | ||
int bluetoothMax, | ||
int totalBluetoothDeviceCount, | ||
int wifiMedian, | ||
double wifiMean, | ||
int wifiMin, | ||
int wifiMax, | ||
int totalWifiDeviceCount) | ||
{ | ||
AggregatedMeasurementDtoId = aggregatedMeasurementDtoId; | ||
StartTime = startTime; | ||
EndTime = endTime; | ||
MeasurementGroupCount = measurementGroupCount; | ||
BluetoothMedian = bluetoothMedian; | ||
BluetoothMean = bluetoothMean; | ||
BluetoothMin = bluetoothMin; | ||
BluetoothMax = bluetoothMax; | ||
TotalBluetoothDeviceCount = totalBluetoothDeviceCount; | ||
WifiMedian = wifiMedian; | ||
WifiMean = wifiMean; | ||
WifiMin = wifiMin; | ||
WifiMax = wifiMax; | ||
TotalWifiDeviceCount = totalWifiDeviceCount; | ||
} | ||
|
||
public int AggregatedMeasurementDtoId { get; } | ||
|
||
public DateTime StartTime { get; } | ||
|
||
public DateTime EndTime { get; } | ||
|
||
public int MeasurementGroupCount { get; } | ||
|
||
public int BluetoothMedian { get; } | ||
|
||
public double BluetoothMean { get; } | ||
|
||
public int BluetoothMin { get; } | ||
|
||
public int BluetoothMax { get; } | ||
|
||
public int TotalBluetoothDeviceCount { get; } | ||
|
||
public int WifiMedian { get; } | ||
public int AggregatedMeasurementId { get; } = aggregatedMeasurementsId; | ||
|
||
public double WifiMean { get; } | ||
public DateTime StartTime { get; } = startTime; | ||
|
||
public int WifiMin { get; } | ||
public DateTime EndTime { get; } = endTime; | ||
|
||
public int WifiMax { get; } | ||
public int BluetoothCount { get; } = bluetoothCount; | ||
|
||
public int TotalWifiDeviceCount { get; } | ||
public int WifiCount { get; } = wifiCount; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.