Table of Contents

Class Controller

Namespace
Pamoja.Profile
Assembly
Pamoja.Profile.dll

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

reading float

The 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

empty float

The level treated as empty.

warnWithin uint

Warn once empty is this many samples away.

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

setpoint float

The target reading.

hysteresis float

Half the deadband width, which stops chattering.

cooling bool

Whether the output cools rather than heats.

safeBand float

How 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

rising bool

Watch a rapid rise rather than a rapid fall.

limit float

The largest safe change per sample.

Returns

Controller

The controller.