Package alarm.actions

Class AlarmAction

java.lang.Object
alarm.actions.AlarmAction
Direct Known Subclasses:
AlarmSerialAction, AlarmUDPAction, PlaySound, SendEmailAction

public abstract class AlarmAction extends Object
  • Field Details

  • Constructor Details

    • AlarmAction

      public AlarmAction(AlarmControl alarmControl)
  • Method Details

    • getActionName

      public abstract String getActionName()
      Returns:
      the name of the alarm action
    • hasSettings

      public abstract boolean hasSettings()
      Returns:
      true if the action has configurable settings
    • setSettings

      public abstract boolean setSettings(Window window)
      Open an action specific dialog to configure the action
      Parameters:
      window - parent window
      Returns:
      true if settings changed.
    • actOnAlarm

      public abstract boolean actOnAlarm(AlarmDataUnit alarmDataUnit)
      Act on the alarm - called every time the data unit is updated.
      Parameters:
      alarmDataUnit - alarm data unit that has changed.
      Returns:
      true if action completed ok
    • canDo

      public abstract int canDo()
      Alarm action can complete (i.e. some tests have been conducted)
      Returns:
      0 = no, 1 = yes, -1 = don't know.
    • prepareAction

      public boolean prepareAction()
      Called when PAMGuard initialises to prepare any alarm actions, e.g. open a serial port, find a file, etc.
      Returns:
      true if preparation completed Ok.