Module tank_level_switch

Source
Expand description

Contains the functionality for reading and postprocessing tank level switch position by reading GPIO pin state

Structsยง

TankLevelSwitch
Contains the measurement of tank level position and calculation of stabilized tank level position signal. Tank level position is measured by accessing the state of a dedicated GPIO pin. Alternatively, TCP communication is used when configured to run with the simulator. The struct holds attributes for the results and for error flags indicating unsuccessful communication. Thread communication of this component is as follows:
TankLevelSwitchSignals
Contains all signal information from the tank level switch relevant for other threads:

Enumsยง

TankLevelSwitchError
Contains error definitions for TankLevelSwitch

Constantsยง

CYCLE_TIME_TANK_LEVEL_SWITCH_MILLIS ๐Ÿ”’
application is monitoring if execution duration can maintain this limit sleep time is adjusted accordingly to run at fixed execution time
MAX_MUTEX_ACCESS_DURATION_MILLIS ๐Ÿ”’
allow max. 10 milliseconds for mutex to be blocked by any other thread
PERMISSIBLE_CYCLE_TIME_DEVIATION_TANK_LEVEL_SWITCH_MILLIS ๐Ÿ”’
application is adapting the sleep time to achieve constant execution rate of 100 milliseconds. this is the threshold from which on the cycle time monitoring alerts.