Skip to main content

Class SimulatedMoistureSensor

A simulated moisture sensor for testing and development purposes.

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 current moisture reading.

View Source
Declaration
public double? Moisture { 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
TypeNameDescription
System.ObjectvalueThe value to set.

GenerateSimulatedValue(SimulationBehavior)

Generates a simulated moisture value based on the specified behavior.

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

System.Double: A simulated moisture value.

Parameters
TypeNameDescription
Meadow.Peripherals.Sensors.SimulationBehaviorbehaviorThe simulation behavior to use.

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