Class SimulatedHumiditySensor
A simulated humidity sensor for testing and development purposes.
Assembly: Meadow.Foundation.dll
View Source
Declaration
public class SimulatedHumiditySensor : SimulatedSamplingSensorBase<RelativeHumidity>, ISimulatedSensor, IHumiditySensor, ISamplingSensor<RelativeHumidity>, ISensor<RelativeHumidity>, ISensor, ISamplingSensor
Inheritance: System.Object
-> Meadow.Foundation.Sensors.SimulatedSensorBase
Implements:
Meadow.Peripherals.Sensors.ISimulatedSensor
, Meadow.Peripherals.Sensors.Atmospheric.IHumiditySensor
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.RelativeHumidity>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.RelativeHumidity>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
Properties
Humidity
Gets the current humidity reading.
View Source
Declaration
public RelativeHumidity? Humidity { get; }
ValueType
Gets the type of value the sensor produces.
View Source
Declaration
public override Type ValueType { get; }
Methods
SetSensorValue(object)
Sets the sensor value.
View Source
Declaration
public override void SetSensorValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to set. |
GenerateSimulatedValue(SimulationBehavior)
Generates a simulated humidity value based on the specified behavior.
View Source
Declaration
protected override RelativeHumidity GenerateSimulatedValue(SimulationBehavior behavior)
Returns
Meadow.Units.RelativeHumidity
: A simulated Meadow.Units.RelativeHumidity
value.
Parameters
Type | Name | Description |
---|---|---|
Meadow.Peripherals.Sensors.SimulationBehavior | behavior | The simulation behavior to use. |
Implements
Meadow.Peripherals.Sensors.ISimulatedSensor
Meadow.Peripherals.Sensors.Atmospheric.IHumiditySensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.RelativeHumidity>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.RelativeHumidity>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor