Class Detector

java.lang.Object
neqsim.process.logic.sis.Detector

public class Detector extends Object
Represents a fire or gas detector in a Safety Instrumented System.

Detectors monitor process conditions and can trigger safety actions when thresholds are exceeded. Each detector has:

  • Alarm level (L, H, HH) indicating severity
  • Trip status (normal or tripped)
  • Measured value and setpoint
  • Bypass capability for maintenance
  • Fault detection
Version:
1.0
Author:
ESOL
  • Field Details

    • name

      private final String name
    • type

      private final Detector.DetectorType type
    • alarmLevel

      private final Detector.AlarmLevel alarmLevel
    • setpoint

      private double setpoint
    • unit

      private String unit
    • isTripped

      private boolean isTripped
    • isBypassed

      private boolean isBypassed
    • isFaulty

      private boolean isFaulty
    • measuredValue

      private double measuredValue
    • tripTime

      private long tripTime
  • Constructor Details

    • Detector

      public Detector(String name, Detector.DetectorType type, Detector.AlarmLevel alarmLevel, double setpoint, String unit)
      Creates a detector.
      Parameters:
      name - detector tag/name
      type - detector type (FIRE, GAS, PRESSURE, etc.)
      alarmLevel - alarm level (L, H, HH)
      setpoint - trip setpoint
      unit - engineering unit
  • Method Details

    • update

      public void update(double measuredValue)
      Updates the detector with a new measured value and evaluates trip condition.
      Parameters:
      measuredValue - current measured value
    • trip

      public void trip()
      Manually trips the detector (for testing).
    • reset

      public void reset()
      Resets the detector after acknowledgment.

      In safety systems, reset typically requires operator action and may have permissive conditions.

    • setBypass

      public void setBypass(boolean bypass)
      Bypasses the detector for maintenance.
      Parameters:
      bypass - true to bypass, false to restore
    • setFaulty

      public void setFaulty(boolean faulty)
      Sets the fault status of the detector.
      Parameters:
      faulty - true if detector has a fault
    • getName

      public String getName()
      Gets the detector name.
      Returns:
      detector name
    • getType

      public Detector.DetectorType getType()
      Gets the detector type.
      Returns:
      detector type
    • getAlarmLevel

      public Detector.AlarmLevel getAlarmLevel()
      Gets the alarm level.
      Returns:
      alarm level
    • isTripped

      public boolean isTripped()
      Checks if detector is tripped.
      Returns:
      true if tripped
    • isBypassed

      public boolean isBypassed()
      Checks if detector is bypassed.
      Returns:
      true if bypassed
    • isFaulty

      public boolean isFaulty()
      Checks if detector is faulty.
      Returns:
      true if faulty
    • getMeasuredValue

      public double getMeasuredValue()
      Gets the measured value.
      Returns:
      measured value
    • getSetpoint

      public double getSetpoint()
      Gets the setpoint.
      Returns:
      setpoint value
    • setSetpoint

      public void setSetpoint(double setpoint)
      Sets a new setpoint.
      Parameters:
      setpoint - new setpoint value
    • getTripTime

      public long getTripTime()
      Gets the time when detector tripped (milliseconds since epoch).
      Returns:
      trip time, or 0 if not tripped
    • toString

      public String toString()
      Overrides:
      toString in class Object