Class Sensor
- Namespace
- Tudormobile.Airthings
- Assembly
- Tudormobile.Airthings.dll
Represents a single sensor reading from an Airthings device.
public record Sensor : IEquatable<Sensor>
- Inheritance
-
Sensor
- Implements
- Inherited Members
Remarks
Mapping of the Airthings API response.
Constructors
Sensor()
public Sensor()
Sensor(Sensor)
protected Sensor(Sensor original)
Parameters
originalSensor
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
SensorType
Gets or sets the type of sensor (e.g., radonShortTermAvg).
public string SensorType { get; set; }
Property Value
Unit
Gets or sets the unit of measurement for the reading (e.g., bq).
public string Unit { get; set; }
Property Value
Value
Gets or sets the sensor reading value.
public double Value { get; set; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(Sensor?)
public virtual bool Equals(Sensor? other)
Parameters
otherSensor
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Sensor?, Sensor?)
public static bool operator ==(Sensor? left, Sensor? right)
Parameters
Returns
operator !=(Sensor?, Sensor?)
public static bool operator !=(Sensor? left, Sensor? right)