Class Detector
java.lang.Object
neqsim.process.logic.sis.Detector
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAlarm level enumeration.static enumDetector type enumeration. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Detector.AlarmLevelprivate booleanprivate booleanprivate booleanprivate doubleprivate final Stringprivate doubleprivate longprivate final Detector.DetectorTypeprivate String -
Constructor Summary
ConstructorsConstructorDescriptionDetector(String name, Detector.DetectorType type, Detector.AlarmLevel alarmLevel, double setpoint, String unit) Creates a detector. -
Method Summary
Modifier and TypeMethodDescriptionGets the alarm level.doubleGets the measured value.getName()Gets the detector name.doubleGets the setpoint.longGets the time when detector tripped (milliseconds since epoch).getType()Gets the detector type.booleanChecks if detector is bypassed.booleanisFaulty()Checks if detector is faulty.booleanChecks if detector is tripped.voidreset()Resets the detector after acknowledgment.voidsetBypass(boolean bypass) Bypasses the detector for maintenance.voidsetFaulty(boolean faulty) Sets the fault status of the detector.voidsetSetpoint(double setpoint) Sets a new setpoint.toString()voidtrip()Manually trips the detector (for testing).voidupdate(double measuredValue) Updates the detector with a new measured value and evaluates trip condition.
-
Field Details
-
name
-
type
-
alarmLevel
-
setpoint
private double setpoint -
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/nametype- detector type (FIRE, GAS, PRESSURE, etc.)alarmLevel- alarm level (L, H, HH)setpoint- trip setpointunit- 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
-
getType
-
getAlarmLevel
-
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
-