Skip to main content

Class SimulatedLightSensor

Represents a simulated light sensor that implements both ILightSensor and ISimulatedSensor interfaces.

Assembly: Meadow.Foundation.dll​
View Source​
Declaration
public class SimulatedLightSensor : BaseSimulatedSensor<Illuminance>, ISimulatedSensor, ILightSensor, ISamplingSensor<Illuminance>, ISensor<Illuminance>, ISensor, ISamplingSensor

Inheritance: System.Object -> Meadow.Foundation.Sensors.BaseSimulatedSensor<TUNIT>

Implements:
Meadow.Peripherals.Sensors.ISimulatedSensor, Meadow.Peripherals.Sensors.Light.ILightSensor, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Illuminance>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Illuminance>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor

Properties​

Illuminance​

Last value read from the Light sensor.

View Source​
Declaration
public Illuminance? Illuminance { get; }

ZeroCondition​

Gets the zero condition for the snsor unit

View Source​
Declaration
public override Illuminance ZeroCondition { get; }

RandomWalkRange​

The upper/lower bound for a random walk

View Source​
Declaration
protected override double RandomWalkRange { get; }

SawtoothStepAmount​

The step amount for a sawtooth simulation

View Source​
Declaration
protected override double SawtoothStepAmount { get; }

Methods​

DecrementCondition(Illuminance)​

Gets a condition decremented by a step value (used for interrupt value changes)

View Source​
Declaration
protected override Illuminance DecrementCondition(Illuminance currentCondition)
Returns​

Meadow.Units.Illuminance

Parameters​
TypeNameDescription
Meadow.Units.IlluminancecurrentConditionThe initial value to decrement

DecrementCondition(Illuminance, double)​

Gets a condition decremented by the provided root value amount

View Source​
Declaration
protected override Illuminance DecrementCondition(Illuminance currentCondition, double conditionDelta)
Returns​

Meadow.Units.Illuminance

Parameters​
TypeNameDescription
Meadow.Units.IlluminancecurrentConditionThe initial value to decrement
System.DoubleconditionDeltaThe delta to decrement by

IncrementCondition(Illuminance)​

Gets a condition incremented by a step value (used for interrupt value changes)

View Source​
Declaration
protected override Illuminance IncrementCondition(Illuminance currentCondition)
Returns​

Meadow.Units.Illuminance

Parameters​
TypeNameDescription
Meadow.Units.IlluminancecurrentConditionThe initial value to increment

IncrementCondition(Illuminance, double)​

Gets a condition incremented by the provided root value amount

View Source​
Declaration
protected override Illuminance IncrementCondition(Illuminance currentCondition, double conditionDelta)
Returns​

Meadow.Units.Illuminance

Parameters​
TypeNameDescription
Meadow.Units.IlluminancecurrentConditionThe initial value to increment
System.DoubleconditionDeltaThe delta to increment by

Implements​

  • Meadow.Peripherals.Sensors.ISimulatedSensor
  • Meadow.Peripherals.Sensors.Light.ILightSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Illuminance>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Illuminance>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor