Interface LogicCondition
- All Known Implementing Classes:
PressureCondition, TemperatureCondition, TimerCondition, ValvePositionCondition
public interface LogicCondition
Interface for defining conditions that must be met for logic to proceed.
Conditions are used for:
- Startup permissives (e.g., temperature above minimum, pressure stable)
- Conditional branching (e.g., if level high then open valve)
- Safety interlocks (e.g., verify pump stopped before opening drain)
- Process state verification (e.g., check all equipment ready)
Example usage:
LogicCondition tempReady = new TemperatureCondition(heater, 80.0, ">=");
LogicCondition pressureOK = new PressureCondition(vessel, 5.0, ">");
StartupLogic startup = new StartupLogic("Startup Sequence");
startup.addPermissive(tempReady);
startup.addPermissive(pressureOK);
- Version:
- 1.0
- Author:
- ESOL
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate()Evaluates if the condition is currently met.Gets the current value being evaluated (for diagnostics).Gets a description of this condition.Gets the expected/setpoint value (for diagnostics).Gets the target equipment this condition monitors (if any).
-
Method Details
-
evaluate
boolean evaluate()Evaluates if the condition is currently met.- Returns:
- true if condition is satisfied, false otherwise
-
getDescription
-
getTargetEquipment
ProcessEquipmentInterface getTargetEquipment()Gets the target equipment this condition monitors (if any).- Returns:
- target equipment, or null if not equipment-specific
-
getCurrentValue
String getCurrentValue()Gets the current value being evaluated (for diagnostics).- Returns:
- current value as string, or empty if not applicable
-
getExpectedValue
String getExpectedValue()Gets the expected/setpoint value (for diagnostics).- Returns:
- expected value as string, or empty if not applicable
-