Package alarm.actions
Class AlarmAction
java.lang.Object
alarm.actions.AlarmAction
- Direct Known Subclasses:
 AlarmSerialAction,AlarmUDPAction,PlaySound,SendEmailAction
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprotected AlarmControl - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionabstract booleanactOnAlarm(AlarmDataUnit alarmDataUnit) Act on the alarm - called every time the data unit is updated.abstract intcanDo()Alarm action can complete (i.e.protected StringcreateAlarmString(AlarmDataUnit alarmDataUnit) Create the alarm string according to standard pgxxx/v2.34.700abstract Stringabstract booleanbooleanCalled when PAMGuard initialises to prepare any alarm actions, e.g.abstract booleansetSettings(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:
 
 - 
alarmControl
 
 - 
 - 
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.
 
 - 
createAlarmString
Create the alarm string according to standard pgxxx/v2.34.700- Parameters:
 alarmDataUnit-- Returns:
 - a string to write to the serial port.
 
 
 -