Package alarm.actions.udp
Class AlarmUDPAction
java.lang.Object
alarm.actions.AlarmAction
alarm.actions.udp.AlarmUDPAction
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
-
Field Summary
Fields inherited from class alarm.actions.AlarmAction
ALARM_CAN_DO, ALARM_CANT_DO, ALARM_DONT_KNOW
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
actOnAlarm
(AlarmDataUnit alarmDataUnit) Act on the alarm - called every time the data unit is updated.int
canDo()
Alarm action can complete (i.e.long
boolean
boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) boolean
setSettings
(Window window) Open an action specific dialog to configure the actionMethods inherited from class alarm.actions.AlarmAction
prepareAction
-
Constructor Details
-
AlarmUDPAction
-
-
Method Details
-
getActionName
- Specified by:
getActionName
in classAlarmAction
- Returns:
- the name of the alarm action
-
hasSettings
public boolean hasSettings()- Specified by:
hasSettings
in classAlarmAction
- Returns:
- true if the action has configurable settings
-
setSettings
Description copied from class:AlarmAction
Open an action specific dialog to configure the action- Specified by:
setSettings
in classAlarmAction
- Parameters:
window
- parent window- Returns:
- true if settings changed.
-
actOnAlarm
Description copied from class:AlarmAction
Act on the alarm - called every time the data unit is updated.- Specified by:
actOnAlarm
in classAlarmAction
- Parameters:
alarmDataUnit
- alarm data unit that has changed.- Returns:
- true if action completed ok
-
canDo
public int canDo()Description copied from class:AlarmAction
Alarm action can complete (i.e. some tests have been conducted)- Specified by:
canDo
in classAlarmAction
- Returns:
- 0 = no, 1 = yes, -1 = don't know.
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-