Rename NucuCarSensorResponse to SensorResponse.

This commit is contained in:
Denis-Cosmin Nutiu 2021-08-02 21:09:29 +03:00
parent 315526ba7d
commit d174c69111
7 changed files with 12 additions and 13 deletions

View file

@ -13,7 +13,7 @@ namespace NucuCar.Sensors.Abstractions
public abstract void Initialize(); public abstract void Initialize();
public abstract Task TakeMeasurementAsync(); public abstract Task TakeMeasurementAsync();
public abstract NucuCarSensorResponse GetMeasurement(); public abstract SensorResponse GetMeasurement();
public abstract SensorStateEnum GetState(); public abstract SensorStateEnum GetState();
} }
} }

View file

@ -2,9 +2,8 @@
namespace NucuCar.Sensors.Abstractions namespace NucuCar.Sensors.Abstractions
{ {
public class NucuCarSensorResponse public class SensorResponse
{ {
// TODO: Fix names in NucuCar.Sensors.Modules.
public SensorStateEnum State; public SensorStateEnum State;
public string SensorId; public string SensorId;
public List<SensorMeasurement> Data; public List<SensorMeasurement> Data;

View file

@ -51,9 +51,9 @@ namespace NucuCar.Sensors.Modules.Environment
Object = this; Object = this;
} }
public override NucuCarSensorResponse GetMeasurement() public override SensorResponse GetMeasurement()
{ {
return new NucuCarSensorResponse return new SensorResponse
{ {
SensorId = GetIdentifier(), SensorId = GetIdentifier(),
State = GetState(), State = GetState(),

View file

@ -62,9 +62,9 @@ namespace NucuCar.Sensors.Modules.Health
return Task.FromResult(_lastTemperatureCelsius); return Task.FromResult(_lastTemperatureCelsius);
} }
public override NucuCarSensorResponse GetMeasurement() public override SensorResponse GetMeasurement()
{ {
return new NucuCarSensorResponse() return new SensorResponse()
{ {
SensorId = GetIdentifier(), SensorId = GetIdentifier(),
State = CurrentState, State = CurrentState,

View file

@ -39,9 +39,9 @@ namespace NucuCar.Sensors.Modules.Heartbeat
return Task.CompletedTask; return Task.CompletedTask;
} }
public override NucuCarSensorResponse GetMeasurement() public override SensorResponse GetMeasurement()
{ {
return new NucuCarSensorResponse() return new SensorResponse()
{ {
SensorId = GetIdentifier(), SensorId = GetIdentifier(),
State = CurrentState, State = CurrentState,

View file

@ -82,9 +82,9 @@ namespace NucuCar.Sensors.Modules.PMS5003
return Task.CompletedTask; return Task.CompletedTask;
} }
public override NucuCarSensorResponse GetMeasurement() public override SensorResponse GetMeasurement()
{ {
return new NucuCarSensorResponse() return new SensorResponse()
{ {
SensorId = GetIdentifier(), SensorId = GetIdentifier(),
State = GetState(), State = GetState(),

View file

@ -16,9 +16,9 @@ namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor
} }
public override NucuCarSensorResponse GetMeasurement() public override SensorResponse GetMeasurement()
{ {
return new NucuCarSensorResponse(); return new SensorResponse();
} }
public override SensorStateEnum GetState() public override SensorStateEnum GetState()