diff --git a/NucuCar.Sensors/Abstractions/GenericTelemeterSensor.cs b/NucuCar.Sensors/Abstractions/GenericTelemeterSensor.cs index 7a13a67..7506e0b 100644 --- a/NucuCar.Sensors/Abstractions/GenericTelemeterSensor.cs +++ b/NucuCar.Sensors/Abstractions/GenericTelemeterSensor.cs @@ -13,7 +13,7 @@ namespace NucuCar.Sensors.Abstractions { protected bool TelemetryEnabled; public abstract string GetIdentifier(); - public abstract Dictionary GetTelemetryData(); + public abstract Dictionary GetTelemetryJson(); public abstract bool IsTelemetryEnabled(); } } \ No newline at end of file diff --git a/NucuCar.Sensors/Modules/BME680/Bme680Sensor.cs b/NucuCar.Sensors/Modules/BME680/Bme680Sensor.cs index 9667f08..4ec1f64 100644 --- a/NucuCar.Sensors/Modules/BME680/Bme680Sensor.cs +++ b/NucuCar.Sensors/Modules/BME680/Bme680Sensor.cs @@ -153,7 +153,7 @@ namespace NucuCar.Sensors.Modules.BME680 return "Environment"; } - public override Dictionary GetTelemetryData() + public override Dictionary GetTelemetryJson() { Dictionary returnValue = null; if (_lastMeasurement != null && TelemetryEnabled) diff --git a/NucuCar.Sensors/Modules/CpuTemperature/CpuTempSensor.cs b/NucuCar.Sensors/Modules/CpuTemperature/CpuTempSensor.cs index 63a1f57..a8f65c9 100644 --- a/NucuCar.Sensors/Modules/CpuTemperature/CpuTempSensor.cs +++ b/NucuCar.Sensors/Modules/CpuTemperature/CpuTempSensor.cs @@ -84,7 +84,7 @@ namespace NucuCar.Sensors.Modules.CpuTemperature return "CpuTemperature"; } - public override Dictionary GetTelemetryData() + public override Dictionary GetTelemetryJson() { Dictionary returnValue = null; if (!double.IsNaN(_lastTemperatureCelsius) && TelemetryEnabled) diff --git a/NucuCar.Sensors/Modules/Heartbeat/HeartbeatSensor.cs b/NucuCar.Sensors/Modules/Heartbeat/HeartbeatSensor.cs index 64a5d61..087d40d 100644 --- a/NucuCar.Sensors/Modules/Heartbeat/HeartbeatSensor.cs +++ b/NucuCar.Sensors/Modules/Heartbeat/HeartbeatSensor.cs @@ -59,7 +59,7 @@ namespace NucuCar.Sensors.Modules.Heartbeat return "Heartbeat"; } - public override Dictionary GetTelemetryData() + public override Dictionary GetTelemetryJson() { var returnValue = new Dictionary { diff --git a/NucuCar.Sensors/Modules/PMS5003/Pms5003Sensor.cs b/NucuCar.Sensors/Modules/PMS5003/Pms5003Sensor.cs index 10b9e63..2a0f142 100644 --- a/NucuCar.Sensors/Modules/PMS5003/Pms5003Sensor.cs +++ b/NucuCar.Sensors/Modules/PMS5003/Pms5003Sensor.cs @@ -124,7 +124,7 @@ namespace NucuCar.Sensors.Modules.PMS5003 return "Pms5003"; } - public override Dictionary GetTelemetryData() + public override Dictionary GetTelemetryJson() { Dictionary returnValue = null; if (_pms5003Data != null && TelemetryEnabled) diff --git a/NucuCar.Telemetry/Abstractions/ITelemeter.cs b/NucuCar.Telemetry/Abstractions/ITelemeter.cs index 7f4749e..7864de1 100644 --- a/NucuCar.Telemetry/Abstractions/ITelemeter.cs +++ b/NucuCar.Telemetry/Abstractions/ITelemeter.cs @@ -14,14 +14,14 @@ namespace NucuCar.Telemetry.Abstractions /// An identifier for the telemetry source. string GetIdentifier(); - // TODO: Perhaps here it's better if we return a string. + // TODO: Perhaps here it's better if we return a string or a json object from Newtonsoft. /// /// This function should return a dictionary containing the telemetry data. /// When implementing this function you should return null if the telemetry is disabled. /// See: /// /// The telemetry data. It should be JSON serializable. - Dictionary GetTelemetryData(); + Dictionary GetTelemetryJson(); /// /// This function should return whether the sensor has telemetry enabled or not. diff --git a/NucuCar.Telemetry/Abstractions/TelemetryPublisher.cs b/NucuCar.Telemetry/Abstractions/TelemetryPublisher.cs index e281650..4d5c40e 100644 --- a/NucuCar.Telemetry/Abstractions/TelemetryPublisher.cs +++ b/NucuCar.Telemetry/Abstractions/TelemetryPublisher.cs @@ -103,7 +103,7 @@ namespace NucuCar.Telemetry.Abstractions var data = new List>(); foreach (var telemeter in RegisteredTelemeters) { - var telemetryData = telemeter.GetTelemetryData(); + var telemetryData = telemeter.GetTelemetryJson(); if (telemetryData == null) { Logger?.LogWarning("Warning! Data for {Identifier} is null!", telemeter.GetIdentifier());