Skip to main content

Class SwitchingRainGauge

Represents a simple switching rain gauge

Assembly: RainGauge.dll​
View Source​
Declaration
public class SwitchingRainGauge : SamplingSensorBase<Length>, IObservable<IChangeResult<Length>>, IRainGauge, ISamplingSensor<Length>, ISensor<Length>, ISensor, ISamplingSensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<UNIT>

Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Length>>, Meadow.Peripherals.Sensors.Weather.IRainGauge, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Length>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Length>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor, System.IDisposable

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

View Source​
Declaration
public int ClickCount { get; protected set; }

RainDepth​

The total accumulated rain depth

View Source​
Declaration
public Length RainDepth { get; }

DepthPerClick​

The amount of rain recorded per rain-gauge event

View Source​
Declaration
public Length DepthPerClick { get; set; }

IsDisposed​

Is the object disposed

View Source​
Declaration
public bool IsDisposed { get; }

Methods​

Reset()​

Reset the rain height

View Source​
Declaration
public void Reset()

StartUpdating(TimeSpan?)​

Start the sensor

View Source​
Declaration
public override void StartUpdating(TimeSpan? updateInterval = null)
Parameters​
TypeName
System.Nullable<System.TimeSpan>updateInterval

StopUpdating()​

Stops sampling the sensor

View Source​
Declaration
public override void StopUpdating()

ReadSensor()​

Convenience method to get the current rain depth

View Source​
Declaration
protected override Task<Length> ReadSensor()
Returns​

System.Threading.Tasks.Task<Meadow.Units.Length>

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source​
Declaration
public void Dispose()

Dispose(bool)​

Dispose of the object

View Source​
Declaration
protected virtual void Dispose(bool disposing)
Parameters​
TypeNameDescription
System.BooleandisposingIs disposing

Implements​

  • System.IObservable<Meadow.IChangeResult<Meadow.Units.Length>>
  • Meadow.Peripherals.Sensors.Weather.IRainGauge
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Length>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Length>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • System.IDisposable