Package alarm.actions
Class AlarmAction
java.lang.Object
alarm.actions.AlarmAction
- Direct Known Subclasses:
AlarmSerialAction
,AlarmUDPAction
,PlaySound
,SendEmailAction
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
actOnAlarm
(AlarmDataUnit alarmDataUnit) Act on the alarm - called every time the data unit is updated.abstract int
canDo()
Alarm action can complete (i.e.abstract String
abstract boolean
boolean
Called when PAMGuard initialises to prepare any alarm actions, e.g.abstract boolean
setSettings
(Window window) Open an action specific dialog to configure the action
-
Field Details
-
ALARM_CANT_DO
public static final int ALARM_CANT_DO- See Also:
-
ALARM_CAN_DO
public static final int ALARM_CAN_DO- See Also:
-
ALARM_DONT_KNOW
public static final int ALARM_DONT_KNOW- See Also:
-
-
Constructor Details
-
AlarmAction
-
-
Method Details
-
getActionName
- Returns:
- the name of the alarm action
-
hasSettings
public abstract boolean hasSettings()- Returns:
- true if the action has configurable settings
-
setSettings
Open an action specific dialog to configure the action- Parameters:
window
- parent window- Returns:
- true if settings changed.
-
actOnAlarm
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.
-