Module heating

Source
Expand description

Contains functionality to control the heater

Structsยง

Heating
Contains the configuration and the implementation for the heating control. Thread communication is as follows:
HeatingMutexes
Contains Arc<Mutex>-wrapped shared data points accessed by the heating control.

Constantsยง

CYCLE_TIME_HEATING_MILLIS ๐Ÿ”’
MAX_MUTEX_ACCESS_DURATION_MILLIS ๐Ÿ”’
allow max. 10 milliseconds for mutex to be blocked by any other thread
TIME_INCREMENT_HEATING_SECS ๐Ÿ”’

Traitsยง

HeatingStatsDataTransferTrait
Trait for the execution of data transfer to SQL database after midnight has arrived. This trait allows running the main control with a mock implementation for testing.

Functionsยง

actuate_heater ๐Ÿ”’
Sends a command to the relay manager to actuate the heater and waits for a response.
switch_off_heater ๐Ÿ”’
Commands the relay manager to switch off the heater.
switch_on_heater ๐Ÿ”’
Commands the relay manager to switch on the heater.