Class Controller
The decision logic a profile assembles.
public sealed class Controller : IDisposable
- Inheritance
-
Controller
- Implements
- Inherited Members
Remarks
A controller carries state between readings, because a level estimate and a rate of change both need the previous sample, so evaluate readings through one controller in the order they were taken.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Evaluate(float)
Decides what one reading calls for.
public Reaction Evaluate(float reading)
Parameters
readingfloatThe reading to evaluate.
Returns
- Reaction
The decision.
Exceptions
- PamojaException
The native call failed.
Level(float, uint)
Warns before a falling level reaches empty.
public static Controller Level(float empty, uint warnWithin)
Parameters
Returns
- Controller
The controller.
Monitor()
Reports readings without judging them.
public static Controller Monitor()
Returns
- Controller
The controller.
Setpoint(float, float, bool, float)
Holds a reading near a setpoint by switching an output on and off.
public static Controller Setpoint(float setpoint, float hysteresis, bool cooling, float safeBand)
Parameters
setpointfloatThe target reading.
hysteresisfloatHalf the deadband width, which stops chattering.
coolingboolWhether the output cools rather than heats.
safeBandfloatHow far the reading may stray before an alert.
Returns
- Controller
The controller.
Surge(bool, float)
Warns when a reading changes faster than a limit.
public static Controller Surge(bool rising, float limit)
Parameters
risingboolWatch a rapid rise rather than a rapid fall.
limitfloatThe largest safe change per sample.
Returns
- Controller
The controller.