Skip to main content

Class SimulatedMoistureSensor

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class SimulatedMoistureSensor : SimulatedSamplingSensorBase<double>, ISimulatedSensor, IMoistureSensor, ISamplingSensor<double>, ISensor<double>, ISensor, ISamplingSensor

Inheritance: System.Object -> Meadow.Foundation.Sensors.SimulatedSensorBase

Implements:
Meadow.Peripherals.Sensors.ISimulatedSensor, Meadow.Peripherals.Sensors.Moisture.IMoistureSensor, Meadow.Peripherals.Sensors.ISamplingSensor<System.Double>, Meadow.Peripherals.Sensors.ISensor<System.Double>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor

Properties

Moisture

Gets the last value read from the moisture sensor.

View Source
Declaration
public double? Moisture { get; }

ValueType

Gets the type of the sensor's value.

View Source
Declaration
public override Type ValueType { get; }

Methods

SetSensorValue(object)

Sets the simulated value for the sensor.

View Source
Declaration
public override void SetSensorValue(object value)
Parameters
TypeNameDescription
System.ObjectvalueThe value to set for the sensor.

GenerateSimulatedValue(SimulationBehavior)

Generates a value based on the provided behavior

View Source
Declaration
protected override double GenerateSimulatedValue(SimulationBehavior behavior)
Returns

System.Double

Parameters
TypeNameDescription
Meadow.Peripherals.Sensors.SimulationBehaviorbehaviorThe behavior to use when generating a value

Implements

  • Meadow.Peripherals.Sensors.ISimulatedSensor
  • Meadow.Peripherals.Sensors.Moisture.IMoistureSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<System.Double>
  • Meadow.Peripherals.Sensors.ISensor<System.Double>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor