Class Surge
Notices a step change between successive readings.
public sealed class Surge : IDisposable
- Inheritance
-
Surge
- Implements
- Inherited Members
Remarks
A sudden jump usually means an event rather than drift: a burst pipe, a door opening, a load switching on.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Falling(float)
Creates a detector for falls of more than the given size between readings.
public static Surge Falling(float limit)
Parameters
limitfloatThe largest safe fall per reading; its magnitude is used.
Returns
- Surge
The detector.
Rising(float)
Creates a detector for rises of more than the given size between readings.
public static Surge Rising(float limit)
Parameters
limitfloatThe largest safe rise per reading; its magnitude is used.
Returns
- Surge
The detector.
Update(float)
Feeds a value in and reports a step past the limit.
public float? Update(float value)
Parameters
valuefloatThe latest reading. One that is not a finite number is ignored.
Returns
- float?
The size of the step, as a positive number, or
nullwhen the change stayed within the limit, went the other way, or this is the first reading.