Characteristic Locus
Inheritance System.Object ObservableBase<Length> SensorBase<Length> > SwitchingRainGauge
Inherited Members SensorBase<Length>.Updated SensorBase<Length>.samplingLock SensorBase<Length>.SamplingTokenSource SensorBase<Length>.Conditions SensorBase<Length>.IsSampling SensorBase<Length>.UpdateInterval SensorBase<Length>.RaiseEventsAndNotify(IChangeResult<>) SensorBase<Length>.Read() ObservableBase<Length>.observers ObservableBase<Length>.NotifyObservers(IChangeResult<>) Meadow.Foundation.ObservableBase<Length>.Subscribe(IObserver<>) Meadow.Foundation.ObservableBase<Length>.CreateObserver(Action<>, System.Nullable<Predicate<IChangeResult<UNIT>>>)
Namespace Meadow.Foundation.Sensors.Weather
Assembly RainGauge.dll

Syntax

public class SwitchingRainGauge : SensorBase<Length>

Constructors

SwitchingRainGauge(IDigitalInputController, IPin)

Declaration
public SwitchingRainGauge(IDigitalInputController device, IPin rainSensorPin)

Parameters

Type Name Description
IDigitalInputController device
IPin rainSensorPin

SwitchingRainGauge(IDigitalInputController, IPin, Length)

Declaration
public SwitchingRainGauge(IDigitalInputController device, IPin rainSensorPin, Length depthPerClick)

Parameters

Type Name Description
IDigitalInputController device
IPin rainSensorPin
Length depthPerClick

SwitchingRainGauge(IDigitalInputPort, Length)

Declaration
public SwitchingRainGauge(IDigitalInputPort rainSensorPort, Length depthPerClick)

Parameters

Type Name Description
IDigitalInputPort rainSensorPort
Length depthPerClick

Properties

ClickCount

The number of times the rain tilt sensor has triggered This count is multiplied by the depth per click to calculate the rain depth

Declaration
public int ClickCount { get; protected set; }

Property Value

Type Description
System.Int32

DepthPerClick

The amount of rain recorded per raingauge event

Declaration
public Length DepthPerClick { get; set; }

Property Value

Type Description
Length

RainDepth

The total accumulated rain depth

Declaration
public Length RainDepth { get; }

Property Value

Type Description
Length

Methods

ReadSensor()

Convenience method to get the current rain depth

Declaration
protected override Task<Length> ReadSensor()

Returns

Type Description
Task<Length>

Overrides

Meadow.Foundation.SensorBase<Length>.ReadSensor()

Reset()

Reset the rain height

Declaration
public void Reset()

StartUpdating()

Start the sensor

Declaration
public void StartUpdating()

StopUpdating()

Stops sampling the sensor

Declaration
public void StopUpdating()