Skip to main content

Class ResistiveTankLevelSender

Represents a generic resistive tank level sender sensor.

Assembly: ResistiveTankLevelSender.dll
View Source
Declaration
public abstract class ResistiveTankLevelSender : SamplingSensorBase<int>, IObservable<IChangeResult<int>>, ISamplingSensor<int>, ISensor<int>, ISensor, ISamplingSensor, IDisposable

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

Derived:
Meadow.Foundation.Sensors.Volume.ResistiveTankLevelSender_12in_33_240

Implements:
System.IObservable<Meadow.IChangeResult<System.Int32>>, Meadow.Peripherals.Sensors.ISamplingSensor<System.Int32>, Meadow.Peripherals.Sensors.ISensor<System.Int32>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor, System.IDisposable

Properties

IsDisposed

Gets a value indicating whether the object is disposed.

View Source
Declaration
public bool IsDisposed { get; }

ResistanceToFillLevelMap

Gets the mapping of resistance (in ohms) to fill level (in 0-100 percent).

View Source
Declaration
protected abstract Dictionary<int, int> ResistanceToFillLevelMap { get; }

FillLevelPercent

Gets the measured fill level percentage.

View Source
Declaration
public int FillLevelPercent { get; }

Methods

ReadSensor()

Read value from sensor

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

System.Threading.Tasks.Task<System.Int32>: unitized value### StartUpdating(TimeSpan?) Starts updating the sensor on the updateInterval frequency specified

View Source
Declaration
public override void StartUpdating(TimeSpan? updateInterval = null)
Parameters
TypeNameDescription
System.Nullable<System.TimeSpan>updateIntervalA TimeSpan that specifies how long to
wait between readings

StopUpdating()

Stops sampling the sensor

View Source
Declaration
public override void StopUpdating()

Dispose(bool)

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

Dispose()

Disposes the object

View Source
Declaration
public void Dispose()

Events

FillLevelChanged

Occurs when the fill level changes.

View Source
Declaration
public event EventHandler<int>? FillLevelChanged
Event Type

System.EventHandler<System.Int32>

Implements

  • System.IObservable<Meadow.IChangeResult<System.Int32>>
  • Meadow.Peripherals.Sensors.ISamplingSensor<System.Int32>
  • Meadow.Peripherals.Sensors.ISensor<System.Int32>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • System.IDisposable