Class PushButton
- All Implemented Interfaces:
Serializable, MeasurementDeviceInterface, NamedInterface
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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag to enable/disable automatic valve activation on push.private booleanIndicates if button is currently pushed (active).private BlowdownValveOptional blowdown valve that this button controls (legacy support).private List<ProcessLogic> List of process logic sequences linked to this button.private static final longSerialization version UID.Fields inherited from class MeasurementDeviceBaseClass
unitFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionPushButton(String name) Constructor for PushButton.PushButton(String name, BlowdownValve blowdownValve) Constructor for PushButton with linked BlowdownValve. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisplays the current state of the push button.Gets the linked blowdown valve.Gets the list of linked process logic sequences.doubleGets the measured value of the push button.doublegetMeasuredValue(String unit) Gets the measured value in the specified unit.booleanChecks if auto-activation is enabled.booleanisPushed()Checks if button is currently pushed.voidlinkToBlowdownValve(BlowdownValve blowdownValve) Links this push button to a blowdown valve.voidlinkToLogic(ProcessLogic logic) Links this push button to a process logic sequence.voidpush()Pushes the button, activating it.voidreset()Resets the button to inactive (not pushed) state.voidsetAutoActivateValve(boolean autoActivate) Sets whether the button should automatically activate the linked valve when pushed.toString()Gets a string representation of the push button state.Methods inherited from class MeasurementDeviceBaseClass
acknowledgeAlarm, applySignalModifiers, doConditionAnalysis, evaluateAlarm, getAlarmConfig, getAlarmState, getConditionAnalysisMaxDeviation, getConditionAnalysisMessage, getDelaySteps, getMaximumValue, getMeasuredPercentValue, getMinimumValue, getNoiseStdDev, getOnlineMeasurementValue, getOnlineSignal, getUnit, isLogging, isOnlineSignal, runConditionAnalysis, setAlarmConfig, setConditionAnalysis, setConditionAnalysisMaxDeviation, setDelaySteps, setIsOnlineSignal, setLogging, setMaximumValue, setMinimumValue, setNoiseStdDev, setOnlineMeasurementValue, setOnlineSignal, setQualityCheckMessage, setRandomSeed, setUnitMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MeasurementDeviceInterface
equals, getOnlineValue, hashCodeMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagName
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
isPushed
private boolean isPushedIndicates if button is currently pushed (active). -
linkedBlowdownValve
Optional blowdown valve that this button controls (legacy support). -
autoActivateValve
private boolean autoActivateValveFlag to enable/disable automatic valve activation on push. -
linkedLogics
List of process logic sequences linked to this button.
-
-
Constructor Details
-
PushButton
-
PushButton
Constructor for PushButton with linked BlowdownValve.- Parameters:
name- name of push buttonblowdownValve- blowdown valve to control
-
-
Method Details
-
linkToBlowdownValve
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
Gets the linked blowdown valve.- Returns:
- linked blowdown valve, or null if not linked
-
linkToLogic
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
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
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:
getMeasuredValuein interfaceMeasurementDeviceInterface- Overrides:
getMeasuredValuein classMeasurementDeviceBaseClass- 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:
displayResultin interfaceMeasurementDeviceInterface- Overrides:
displayResultin classMeasurementDeviceBaseClass
-
toString
-