Class PushButton

All Implemented Interfaces:
Serializable, MeasurementDeviceInterface, NamedInterface

public class PushButton extends MeasurementDeviceBaseClass
Push Button instrument for manual activation of equipment (e.g., ESD blowdown valves) and process logic sequences.

A push button is a simple binary instrument that can be in one of two states: pushed (active) or not pushed (inactive). It is typically used to manually trigger emergency shutdown (ESD) systems, blowdown valves, or other safety-critical equipment.

Key features:

  • Binary state: active (pushed) or inactive (not pushed)
  • Can be linked to BlowdownValve for direct activation (legacy)
  • Can be linked to ProcessLogic sequences (ESD, startup, etc.)
  • Manual activation and reset capability
  • Measured value: 1.0 when pushed, 0.0 when not pushed
  • Supports alarm configuration for activation logging

Typical usage with blowdown valve:

// Create blowdown valve
BlowdownValve bdValve = new BlowdownValve("BD-101", blowdownStream);

// Create push button linked to BD valve
PushButton esdButton = new PushButton("ESD-PB-101", bdValve);

// In emergency situation, operator pushes button
esdButton.push(); // Activates linked BD valve

// Check button state
if (esdButton.isPushed()) {
  System.out.println("ESD button is pushed - blowdown active");
}

// After emergency is resolved, reset button
esdButton.reset(); // Does NOT reset the BD valve - requires separate reset
Version:
$Id: $Id
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • isPushed

      private boolean isPushed
      Indicates if button is currently pushed (active).
    • linkedBlowdownValve

      private BlowdownValve linkedBlowdownValve
      Optional blowdown valve that this button controls (legacy support).
    • autoActivateValve

      private boolean autoActivateValve
      Flag to enable/disable automatic valve activation on push.
    • linkedLogics

      private List<ProcessLogic> linkedLogics
      List of process logic sequences linked to this button.
  • Constructor Details

    • PushButton

      public PushButton(String name)
      Constructor for PushButton.
      Parameters:
      name - name of push button
    • PushButton

      public PushButton(String name, BlowdownValve blowdownValve)
      Constructor for PushButton with linked BlowdownValve.
      Parameters:
      name - name of push button
      blowdownValve - blowdown valve to control
  • Method Details

    • linkToBlowdownValve

      public void linkToBlowdownValve(BlowdownValve blowdownValve)
      Links this push button to a blowdown valve.

      When the button is pushed, it will automatically activate the linked blowdown valve (if autoActivateValve is true).

      Parameters:
      blowdownValve - blowdown valve to control
    • getLinkedBlowdownValve

      public BlowdownValve getLinkedBlowdownValve()
      Gets the linked blowdown valve.
      Returns:
      linked blowdown valve, or null if not linked
    • linkToLogic

      public void linkToLogic(ProcessLogic logic)
      Links this push button to a process logic sequence.

      When the button is pushed, all linked logic sequences will be activated. This allows a single button to trigger complex multi-step operations like ESD sequences, startup procedures, etc.

      Parameters:
      logic - process logic to activate when button is pushed
    • getLinkedLogics

      public List<ProcessLogic> getLinkedLogics()
      Gets the list of linked process logic sequences.
      Returns:
      list of linked logic sequences (unmodifiable)
    • push

      public void push()
      Pushes the button, activating it.

      If a blowdown valve is linked and auto-activation is enabled, this will also activate the valve. Additionally, all linked process logic sequences will be activated.

    • reset

      public void reset()
      Resets the button to inactive (not pushed) state.

      Note: This does NOT reset the linked blowdown valve. The valve must be reset separately for safety reasons - button reset only indicates operator acknowledgment, not system reset.

    • isPushed

      public boolean isPushed()
      Checks if button is currently pushed.
      Returns:
      true if button is pushed (active)
    • setAutoActivateValve

      public void setAutoActivateValve(boolean autoActivate)
      Sets whether the button should automatically activate the linked valve when pushed.
      Parameters:
      autoActivate - true to enable auto-activation, false to disable
    • isAutoActivateValve

      public boolean isAutoActivateValve()
      Checks if auto-activation is enabled.
      Returns:
      true if button will automatically activate linked valve when pushed
    • getMeasuredValue

      public double getMeasuredValue()
      Gets the measured value of the push button.

      Returns 1.0 if button is pushed (active), 0.0 if not pushed (inactive).

      Returns:
      1.0 if pushed, 0.0 if not pushed
    • getMeasuredValue

      public double getMeasuredValue(String unit)
      Gets the measured value in the specified unit.

      Push button only supports "binary" unit. Returns 1.0 if pushed, 0.0 if not pushed.

      Specified by:
      getMeasuredValue in interface MeasurementDeviceInterface
      Overrides:
      getMeasuredValue in class MeasurementDeviceBaseClass
      Parameters:
      unit - engineering unit (only "binary" or "" supported)
      Returns:
      1.0 if pushed, 0.0 if not pushed
    • displayResult

      public void displayResult()
      Displays the current state of the push button.
      Specified by:
      displayResult in interface MeasurementDeviceInterface
      Overrides:
      displayResult in class MeasurementDeviceBaseClass
    • toString

      public String toString()
      Gets a string representation of the push button state.
      Overrides:
      toString in class Object
      Returns:
      string describing button state