Table of Contents

Class Thermostat

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

Switches a load on and off around a setpoint, with hysteresis to stop chatter.

public sealed class Thermostat : IDisposable
Inheritance
Thermostat
Implements
Inherited Members

Remarks

Without a dead band a load switches rapidly around the setpoint and wears out; the hysteresis is what makes on/off control safe for a compressor or a pump.

Properties

IsOn

Gets whether the load should currently be on.

public bool IsOn { get; }

Property Value

bool

Methods

Cooling(float, float)

Creates a cooling thermostat, which switches on when the reading rises.

public static Thermostat Cooling(float setpoint, float hysteresis)

Parameters

setpoint float

The value being held.

hysteresis float

How far past the setpoint before switching.

Returns

Thermostat

The thermostat.

Dispose()

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

public void Dispose()

Heating(float, float)

Creates a heating thermostat, which switches on when the reading falls.

public static Thermostat Heating(float setpoint, float hysteresis)

Parameters

setpoint float

The value being held.

hysteresis float

How far past the setpoint before switching.

Returns

Thermostat

The thermostat.

Update(float)

Feeds a reading in and reports whether the load should be on.

public bool Update(float reading)

Parameters

reading float

The latest measured value.

Returns

bool

true while the load should run.