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