Package alarm.actions.serial
Class AlarmSerialAction
java.lang.Object
alarm.actions.AlarmAction
alarm.actions.serial.AlarmSerialAction
- Direct Known Subclasses:
 TastAction
Alarm action for serial port output. Since all alarms will share 
 a serial port, will need to wrap most of the functionality up in a 
 singleton class that does the actual work of writing to the 
 serial port.
- Author:
 - Doug Gillespie
 
- 
Field Summary
Fields inherited from class alarm.actions.AlarmAction
ALARM_CAN_DO, ALARM_CANT_DO, ALARM_DONT_KNOW, alarmControl - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanactOnAlarm(AlarmDataUnit alarmDataUnit) Act on the alarm - called every time the data unit is updated.intcanDo()Alarm action can complete (i.e.booleanbooleanCalled when PAMGuard initialises to prepare any alarm actions, e.g.booleansetSettings(Window window) Open an action specific dialog to configure the actionMethods inherited from class alarm.actions.AlarmAction
createAlarmString 
- 
Constructor Details
- 
AlarmSerialAction
 
 - 
 - 
Method Details
- 
getActionName
- Specified by:
 getActionNamein classAlarmAction- Returns:
 - the name of the alarm action
 
 - 
hasSettings
public boolean hasSettings()- Specified by:
 hasSettingsin classAlarmAction- Returns:
 - true if the action has configurable settings
 
 - 
setSettings
Description copied from class:AlarmActionOpen an action specific dialog to configure the action- Specified by:
 setSettingsin classAlarmAction- Parameters:
 window- parent window- Returns:
 - true if settings changed.
 
 - 
actOnAlarm
Description copied from class:AlarmActionAct on the alarm - called every time the data unit is updated.- Specified by:
 actOnAlarmin classAlarmAction- Parameters:
 alarmDataUnit- alarm data unit that has changed.- Returns:
 - true if action completed ok
 
 - 
canDo
public int canDo()Description copied from class:AlarmActionAlarm action can complete (i.e. some tests have been conducted)- Specified by:
 canDoin classAlarmAction- Returns:
 - 0 = no, 1 = yes, -1 = don't know.
 
 - 
prepareAction
public boolean prepareAction()Description copied from class:AlarmActionCalled when PAMGuard initialises to prepare any alarm actions, e.g. open a serial port, find a file, etc.- Overrides:
 prepareActionin classAlarmAction- Returns:
 - true if preparation completed Ok.
 
 
 -