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 Link icon

  • Constructor Details Link icon

    • AlarmAction Link icon

      public AlarmAction(AlarmControl alarmControl)
  • Method Details Link icon

    • getActionName Link icon

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

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

      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 Link icon

      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 Link icon

      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 Link icon

      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.