TAlarmSystem is a utility class with numerous static methods for access alarm data from either the central alarm system of the local alarm subsystems of targeted servers. More...
Static Public Member Functions | |
static int | disableAlarm (String context, String server, int alarmCode) |
Disables the specific alarm given for the given server at the CAS. More... | |
static int | disableAlarm (String context, String server, int alarmCode, String caller) |
Disables the specific alarm given for the given server at the CAS. More... | |
static int | disableAlarm (String context, String server, String device, int alarmCode) |
Disables the specific alarm given for the given server and device at the CAS. More... | |
static int | disableCurrentAlarm (String context, String server, String device, int alarmCode) |
Disables the specific alarm given for the given server and device at the CAS, but only for the current active instance of the alarm. More... | |
static int | disableAlarm (String context, String server, String device, int alarmCode, String cmt) |
Disables the specific alarm given for the given server and device at the CAS and provide a comment (reason) for the disabling action. More... | |
static int | disableAlarms (String context, String server, int[] alarmCodes) |
Disables the alarms in the given list for the given server at the CAS. More... | |
static boolean | isDisabledAlarmActive (String context, String server, String device, int alarmCode) |
Determines whether the specified disabled alarm is currently in an active state (and hence whether enabling the alarm would result in an alarm state). More... | |
static TAlarmMessage[] | getDisabledAlarms (String context, String alarmSystem) |
Gets the disabled alarm list for the given context and alarm system. More... | |
static int | enableAlarm (String context, String server, int alarmCode) |
Enables the specific alarm given list for the given server at the CAS. More... | |
static int | enableAlarm (String context, String server, String device, int alarmCode) |
Enables the specific alarm given list for the given server and device at the CAS. More... | |
static int | enableAlarms (String context, String server, int[] alarmCodes) |
Enables the alarms in the given list for the given server at the CAS. More... | |
static int | enableAlarms (String context, String server) |
Enables all alarms for the given server at the CAS. More... | |
static String[] | getAlarmSystems (String context) |
Gets the alarm systems available in the given context. More... | |
static synchronized void | clearCache () |
Clear the cache holding the alarm systems map. | |
static synchronized NAME16II[] | getAlarmSystemsMap (String context) |
Gets the alarm systems available in the given context. More... | |
static synchronized NAME16II[] | getAlarmSystemsMap (String context, boolean acquireAll) |
Gets the alarm systems available in the given context. More... | |
static String | getAlarmSystem (String context, int alarmSystemNumber) |
Gets the alarm system corresponding the the alarm system number and context given. More... | |
static int | getNumberOfAlarms (String context, String server, String alarmSystem, long start, long stop, int severity) |
Gets the number of recent alarms in the time interval (up to 2 hours) More... | |
static int | getNumberOfAlarms (String context, String server, String alarmSystem, long start, long stop, int severity, boolean includeTerminated) |
Gets the number of recent alarms in the time interval (up to 2 hours) More... | |
static TLink | monitorAlarms (String context, String server, String alarmSystem, int severity, AlarmMonitor almMonitor) |
Monitors the recent alarms in the time interval (up to 2 hours) More... | |
static TAlarmMessage[] | getAlarms (String context, String server, String alarmSystem, long start, long stop, int severity) |
Gets the alarm message structure array. More... | |
static synchronized TAlarmMessage[] | getAlarms (String context, String server, String alarmSystem, long start, long stop, int severity, boolean includeTerminated) |
Gets the alarm message structure array. More... | |
static TCASAlarmMessage[] | getAlarmsWithText (String context, String alarmSystem, long start, long stop, int severity, boolean includeTerminated) |
Gets the alarm message structure array from the CAS with extended text. More... | |
static TAlarmMessage[] | getAlarms (String context, String alarmSystem, long start, long stop, int severity) |
Gets the alarm message structure array. More... | |
static TAlarmMessage[] | getAlarmsFromServer (String context, String server, long start, long stop, int severity) |
Gets the alarm message structure array from the targeted server. More... | |
static TAlarmDefinition[] | getAlarmDefinitions (String context, String server, int alarmCode) |
Gets the alarm definition structure array. More... | |
static TAlarmDefinition[] | getAlarmDefinitions (String context, String server) |
Gets the alarm definition structure array. More... | |
static TAlarmDefinition[] | getAlarmDefinitionsFromServer (String context, String server) |
Gets the alarm definition structure array from the targeted server. More... | |
TAlarmSystem is a utility class with numerous static methods for access alarm data from either the central alarm system of the local alarm subsystems of targeted servers.
|
static |
Disables the specific alarm given for the given server at the CAS.
The alarm will be disabled for all registered devices on the given server.
context | is the TINE context |
server | is the targeted server |
alarmCode | is the alarm code of the alarm which should be disabled at the Central Alarm Server |
References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().
|
static |
Disables the specific alarm given for the given server at the CAS.
The alarm will be disabled for all registered devices on the given server.
context | is the TINE context |
server | is the targeted server |
alarmCode | is the alarm code of the alarm which should be disabled at the Central Alarm Server |
caller | is the specific caller who is initiating the disabling action |
References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().
|
static |
Disables the specific alarm given for the given server and device at the CAS.
context | is the TINE context |
server | is the targeted server |
device | is the targeted device. If device is null or an empty string, then alarms with the given alarm code will be disabled for ALL devices from the specified server. |
alarmCode | is the alarm code of the alarm which should be disabled at the Central Alarm Server |
References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().
|
static |
Disables the specific alarm given for the given server and device at the CAS and provide a comment (reason) for the disabling action.
context | is the TINE context |
server | is the targeted server |
device | is the targeted device. If device is null or an empty string, then alarms with the given alarm code will be disabled for ALL devices from the specified server. |
alarmCode | is the alarm code of the alarm which should be disabled at the Central Alarm Server |
cmt | is an annotation to the disabling action. |
References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().
|
static |
Disables the alarms in the given list for the given server at the CAS.
context | is the TINE context |
server | is the targeted server |
alarmCodes | is a simple array of those alarm codes which should be disabled at the Central Alarm Server |
References de.desy.tine.client.TLink.executeAndClose().
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm(), and de.desy.tine.alarmUtils.TAlarmSystem.disableCurrentAlarm().
|
static |
Disables the specific alarm given for the given server and device at the CAS, but only for the current active instance of the alarm.
Once the active alarm has terminated any new alarms for the device and code specified will NOT be disabled!
context | is the TINE context |
server | is the targeted server |
device | is the targeted device. If device is null or an empty string, then alarms with the given alarm code will be disabled for ALL devices from the specified server. |
alarmCode | is the alarm code of the alarm which should be disabled at the Central Alarm Server |
References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().
|
static |
Enables the specific alarm given list for the given server at the CAS.
Using this call will enable the given alarm code for ALL registered devices on the given server.
context | is the TINE context |
server | is the targeted server |
alarmCode | is the alarm code of the alarm which should be enabled at the Central Alarm Server |
References de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms().
|
static |
Enables the specific alarm given list for the given server and device at the CAS.
context | is the TINE context. |
server | is the targeted server. |
device | is the targeted device. If device is null or an empty string, then alarms with the given alarm code will be enabled for ALL devices from the specified server. |
alarmCode | is the alarm code of the alarm which should be enabled at the Central Alarm Server |
References de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms().
|
static |
Enables all alarms for the given server at the CAS.
context | is the TINE context |
server | is the targeted server |
References de.desy.tine.client.TLink.executeAndClose().
|
static |
Enables the alarms in the given list for the given server at the CAS.
context | is the TINE context |
server | is the targeted server |
alarmCodes | is a simple array of those alarm codes which should be enabled at the Central Alarm Server |
References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.enableAlarm().
|
static |
Gets the alarm definition structure array.
This method gets the alarm definition structure array as registered at the Central Alarm Server for the given server.
context | is the TINE context |
server | is the targeted server. |
References de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions().
|
static |
Gets the alarm definition structure array.
This method gets the alarm definition structure array as registered at the Central Alarm Server
context | is the TINE context |
server | is the targeted server. |
alarmCode | is the targeted alarm code. Passing a value less than zero will acquire all known alarm definitions. |
References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions().
|
static |
Gets the alarm definition structure array from the targeted server.
This method gets the alarm definition structure array directly from the targeted server.
context | [input] is the TINE context |
server | [input] is the targeted server. |
References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().
|
static |
Gets the alarm message structure array.
This method gets the alarm message structure array from the Central Alarm Server.
context | [input] is the TINE context |
alarmSystem | [input] is the targeted alarm system and can refer to a registered alarm system or to a specific server when given in the form "Server:<server name>" |
start | [input] is the start time for the search as a UTC long |
stop | [input] is the stop time for the search as a UTC long |
severity | [input] is the minimum severity for the search |
References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().
|
static |
Gets the alarm message structure array.
This method gets the alarm message structure array from either the Central Alarm Server (server == null) or the targeted server.
context | [input] is the TINE context |
server | [input] is the targeted server if given. To get alarms from the Central Alarm Server, this parameter should be null. |
alarmSystem | [input] is the targeted alarm system and is only valid for call to the Central Alarm Server. alarmSystem can be a registered alarm system or refer to a specific server when given in the form "Server:<server name>" |
start | [input] is the start time for the search as a UTC long |
stop | [input] is the stop time for the search as a UTC long |
severity | [input] is the minimum severity for the search |
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarms(), and de.desy.tine.alarmUtils.TAlarmSystem.getAlarmsFromServer().
|
static |
Gets the alarm message structure array.
This method gets the alarm message structure array from either the Central Alarm Server (server == null) or the targeted server. One can alternatively include terminated alarms or not
context | [input] is the TINE context |
server | [input] is the targeted server if given. To get alarms from the Central Alarm Server, this parameter should be null. |
alarmSystem | [input] is the targeted alarm system and is only valid for call to the Central Alarm Server. alarmSystem can be a registered alarm system or refer to a specific server when given in the form "Server:<server name>" |
start | [input] is the start time for the search as a UTC long |
stop | [input] is the stop time for the search as a UTC long |
severity | [input] is the minimum severity for the search |
includeTerminated | specifies whether terminated alarms are to be included or not |
References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().
|
static |
Gets the alarm message structure array from the targeted server.
This method gets the alarm message structure array from the targeted server.
context | [input] is the TINE context |
server | [input] is the targeted server name |
start | [input] is the start time for the search as a UTC long |
stop | [input] is the stop time for the search as a UTC long |
severity | [input] is the minimum severity for the search |
References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().
|
static |
Gets the alarm message structure array from the CAS with extended text.
This method gets the alarm message structure array from the Central Alarm Server. One can alternatively include terminated alarms or not
context | [input] is the TINE context |
alarmSystem | [input] is the targeted alarm system and is only valid for call to the Central Alarm Server. alarmSystem can be a registered alarm system or refer to a specific server when given in the form "Server:<server name>" |
start | [input] is the start time for the search as a UTC long |
stop | [input] is the stop time for the search as a UTC long |
severity | [input] is the minimum severity for the search |
includeTerminated | specifies whether terminated alarms are to be included or not |
|
static |
Gets the alarm system corresponding the the alarm system number and context given.
This method gets the alarm system corresponding the the alarm system number and context given.
context | [input] is the TINE context |
alarmSystemNumber | [input] is the specified alarm system number for which the system name is desired. |
References de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystemsMap().
|
static |
Gets the alarm systems available in the given context.
This method gets the available alarm systems in the given context as a simple string array. For the mapping of alarm system names to alarm system numbers use getAlarmSystemsMap
context | [input] is the TINE context |
|
static |
Gets the alarm systems available in the given context.
This method gets the available alarm systems in the given context as an array of NAME16I pairs, which gives a mapping of the alarm system name (NAME16 part) to the alarm system number (integer part).
context | [input] is the TINE context |
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystem().
|
static |
Gets the alarm systems available in the given context.
This method gets the available alarm systems in the given context as an array of NAME16I pairs, which gives a mapping of the alarm system name (NAME16 part) to the alarm system number (integer part).
context | [input] is the TINE context |
acquireAll | [input] if 'true' will also return alarm subsystems marked as 'hidden' |
References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().
|
static |
Gets the disabled alarm list for the given context and alarm system.
context | is the TINE context |
alarmSystem | is the targeted alarm system |
References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().
|
static |
Gets the number of recent alarms in the time interval (up to 2 hours)
This method gets the number of recent alarms in the time interval given. The time interval can be within the most recent 2 hours or a values of -(depth) and -1 can be passed to signal the most recent 2 hour period.
context | is the TINE context |
server | is the targeted server (null => Central alarm server) |
alarmSystem | is the targeted alarm sub system |
start | is the UTC start time (or a negative depth in milliseconds) |
stop | is the UTC stop time (or -1 if start is the depth) |
severity | is the lower limit for the severity filter |
Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms().
|
static |
Gets the number of recent alarms in the time interval (up to 2 hours)
This method gets the number of recent alarms in the time interval given. The time interval can be within the most recent 2 hours or a values of -(depth) and -1 can be passed to signal the most recent 2 hour period. One can alternatively include terminated alarms or not.
context | is the TINE context |
server | is the targeted server (null => Central alarm server) |
alarmSystem | is the targeted alarm sub system |
start | is the UTC start time (or a negative depth in milliseconds) |
stop | is the UTC stop time (or -1 if start is the depth) |
severity | is the lower limit for the severity filter |
includeTerminated | specifies whether to include terminated alarms or not |
References de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms().
|
static |
Determines whether the specified disabled alarm is currently in an active state (and hence whether enabling the alarm would result in an alarm state).
context | is the TINE context |
server | is the targeted server |
device | is the targeted device. A null string checks for all devices. |
alarmCode | is the targeted alarm code. |
|
static |
Monitors the recent alarms in the time interval (up to 2 hours)
This method monitors the recent alarms and calls the AlarmHandler from the
AlarmMonitor provided. Calling this method only makes sense in a persistent application (e.g. not a command line application). The handler will be fired upon any change of alarm information within the most recent 2 hour interval. When the handler is called, the instance of the Monitor is passed, which can be queried for all relevant alarms and their properties.
context | is the TINE context |
server | is the targeted server (null => Central alarm server) |
alarmSystem | is the targeted alarm sub system |
severity | is the lower limit for the severity filter |
almMonitor | is a AlarmMonitor object whose AlarmHandler is to be fired upon change of data |