Table of Contents

Class Depletion

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

Warns before a falling level runs out, by projecting its rate of fall.

public sealed class Depletion : IDisposable
Inheritance
Depletion
Implements
Inherited Members

Remarks

Knowing a tank is empty is too late; this reports how many samples remain at the current rate, so the refill can be arranged while there is still time.

Constructors

Depletion(float)

Creates an estimator counting down to a threshold.

public Depletion(float threshold)

Parameters

threshold float

The level treated as empty.

Methods

Dispose()

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

public void Dispose()

Update(float)

Records a level and estimates the samples left before the threshold.

public uint? Update(float level)

Parameters

level float

The latest measured level.

Returns

uint?

The samples remaining, or null while the level is steady or rising, and on the first reading, when no rate of fall is known yet.