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 Details

    • evaluate

      boolean evaluate()
      Evaluates if the condition is currently met.
      Returns:
      true if condition is satisfied, false otherwise
    • getDescription

      String getDescription()
      Gets a description of this condition.
      Returns:
      human-readable description
    • 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