Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
Loading...
Searching...
No Matches
Functions
FaultPolicy Namespace Reference

Fault classification and telemetry labeling helpers. More...

Functions

FaultPolicySnapshot evaluate (const ControlSnapshot &controlSnapshot, const FaultMonitorSnapshot &faultSnapshot)
 Evaluates alarms and fault response from control and fan-monitor state.
 
const char * alarmCodeLabel (AlarmCode alarmCode)
 Converts an alarm code to a telemetry-safe label.
 
const char * severityLabel (FaultSeverity severity)
 Converts a severity value to a telemetry-safe label.
 
const char * responseLabel (FaultResponse response)
 Converts a fault response to a telemetry-safe label.
 

Detailed Description

Fault classification and telemetry labeling helpers.

The namespace consumes already-computed control and fan-monitor snapshots. It does not read sensors or drive hardware; it only classifies the current state and returns stable labels for diagnostics.

Function Documentation

◆ alarmCodeLabel()

const char * FaultPolicy::alarmCodeLabel ( AlarmCode  alarmCode)

Converts an alarm code to a telemetry-safe label.

Parameters
alarmCodeAlarm code to label.
Returns
Null-terminated label string.

◆ evaluate()

FaultPolicySnapshot FaultPolicy::evaluate ( const ControlSnapshot controlSnapshot,
const FaultMonitorSnapshot faultSnapshot 
)

Evaluates alarms and fault response from control and fan-monitor state.

Parameters
controlSnapshotLatest control-engine result.
faultSnapshotLatest fan fault-monitor result.
Returns
Fault policy decision for diagnostics, telemetry, and UI output.

◆ responseLabel()

const char * FaultPolicy::responseLabel ( FaultResponse  response)

Converts a fault response to a telemetry-safe label.

Parameters
responseResponse to label.
Returns
Null-terminated label string.

◆ severityLabel()

const char * FaultPolicy::severityLabel ( FaultSeverity  severity)

Converts a severity value to a telemetry-safe label.

Parameters
severitySeverity to label.
Returns
Null-terminated label string.