NucuCar/NucuCar.Sensors/EnvironmentSensor/Measurement.cs

23 lines
671 B
C#
Raw Normal View History

2019-11-09 14:54:06 +00:00
using Iot.Units;
namespace NucuCar.Sensors.EnvironmentSensor
2019-11-09 14:54:06 +00:00
{
public struct Measurement
2019-11-09 14:54:06 +00:00
{
public Temperature Temperature { get; private set; }
public double Pressure { get; private set; }
public double Humidity { get; private set; }
2019-11-09 14:54:06 +00:00
public Measurement(Temperature temperature, double pressure, double humidity) : this()
2019-11-09 14:54:06 +00:00
{
SetMeasurement(temperature, pressure, humidity);
}
public void SetMeasurement(Temperature temperature, double pressure, double humidity)
{
Temperature = temperature;
Pressure = pressure;
Humidity = humidity;
}
}
}