Class SimulatedLightSensor
Represents a simulated light sensor that implements both ILightSensor and ISimulatedSensor interfaces.
Assembly: Meadow.Foundation.dll
View Source
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
public Illuminance? Illuminance { get; }
ZeroCondition
Gets the zero condition for the snsor unit
View Source
public override Illuminance ZeroCondition { get; }
RandomWalkRange
The upper/lower bound for a random walk
View Source
protected override double RandomWalkRange { get; }
SawtoothStepAmount
The step amount for a sawtooth simulation
View Source
protected override double SawtoothStepAmount { get; }
Methods
DecrementCondition(Illuminance)
Gets a condition decremented by a step value (used for interrupt value changes)
View Source
protected override Illuminance DecrementCondition(Illuminance currentCondition)
Returns
Meadow.Units.Illuminance
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Illuminance | currentCondition | The initial value to decrement |
DecrementCondition(Illuminance, double)
Gets a condition decremented by the provided root value amount
View Source
protected override Illuminance DecrementCondition(Illuminance currentCondition, double conditionDelta)
Returns
Meadow.Units.Illuminance
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Illuminance | currentCondition | The initial value to decrement |
System.Double | conditionDelta | The delta to decrement by |
IncrementCondition(Illuminance)
Gets a condition incremented by a step value (used for interrupt value changes)
View Source
protected override Illuminance IncrementCondition(Illuminance currentCondition)
Returns
Meadow.Units.Illuminance
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Illuminance | currentCondition | The initial value to increment |
IncrementCondition(Illuminance, double)
Gets a condition incremented by the provided root value amount
View Source
protected override Illuminance IncrementCondition(Illuminance currentCondition, double conditionDelta)
Returns
Meadow.Units.Illuminance
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Illuminance | currentCondition | The initial value to increment |
System.Double | conditionDelta | The 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