Interface AlarmActionHandler
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for handling alarm-triggered actions.
This interface allows automatic responses to alarm events, such as:
- Control adjustments (valve throttling, flow reduction)
- Safety logic activation (ESD, HIPPS)
- Operator notifications
- Logging and reporting
- Version:
- 1.0
- Author:
- ESOL
-
Method Summary
Modifier and TypeMethodDescriptionstatic AlarmActionHandleractivateLogic(String sourceName, AlarmLevel level, AlarmEventType eventType, ProcessLogic logic) Creates a handler that activates process logic when alarm conditions are met.static AlarmActionHandleractivateLogicOnHIHI(String sourceName, ProcessLogic logic) Creates a handler that activates process logic when HIHI alarm is activated.static AlarmActionHandleractivateLogicOnLOLO(String sourceName, ProcessLogic logic) Creates a handler that activates process logic when LOLO alarm is activated.static AlarmActionHandlercomposite(List<AlarmActionHandler> handlers) Creates a composite handler that executes multiple handlers in sequence.default StringReturns a description of the action this handler performs.default intReturns the priority of this handler (higher values execute first).booleanhandle(AlarmEvent event) Handles an alarm event and performs the configured action.
-
Method Details
-
handle
Handles an alarm event and performs the configured action.- Parameters:
event- the alarm event that triggered this handler- Returns:
- true if action was taken, false otherwise
-
getPriority
default int getPriority()Returns the priority of this handler (higher values execute first).- Returns:
- handler priority
-
getActionDescription
Returns a description of the action this handler performs.- Returns:
- action description
-
activateLogic
static AlarmActionHandler activateLogic(String sourceName, AlarmLevel level, AlarmEventType eventType, ProcessLogic logic) Creates a handler that activates process logic when alarm conditions are met.- Parameters:
sourceName- the alarm source name to match (e.g., "PT-101")level- the alarm level to match (HIHI, HI, LO, LOLO)eventType- the event type to match (ACTIVATED, CLEARED, ACKNOWLEDGED)logic- the process logic to activate- Returns:
- alarm action handler
-
activateLogicOnHIHI
Creates a handler that activates process logic when HIHI alarm is activated.- Parameters:
sourceName- the alarm source name to matchlogic- the process logic to activate- Returns:
- alarm action handler
-
activateLogicOnLOLO
Creates a handler that activates process logic when LOLO alarm is activated.- Parameters:
sourceName- the alarm source name to matchlogic- the process logic to activate- Returns:
- alarm action handler
-
composite
Creates a composite handler that executes multiple handlers in sequence.- Parameters:
handlers- list of handlers to execute- Returns:
- composite alarm action handler
-