Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Static Public Member Functions | List of all members
de.desy.tine.alarmUtils.TAlarmSystem Class Reference

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...
 

Detailed Description

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.


Author
duval
duval

Member Function Documentation

◆ disableAlarm() [1/4]

static int de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm ( String  context,
String  server,
int  alarmCode 
)
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.

Parameters
contextis the TINE context
serveris the targeted server
alarmCodeis the alarm code of the alarm which should be disabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().

◆ disableAlarm() [2/4]

static int de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm ( String  context,
String  server,
int  alarmCode,
String  caller 
)
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.

Parameters
contextis the TINE context
serveris the targeted server
alarmCodeis the alarm code of the alarm which should be disabled at the Central Alarm Server
calleris the specific caller who is initiating the disabling action
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().

◆ disableAlarm() [3/4]

static int de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm ( String  context,
String  server,
String  device,
int  alarmCode 
)
static

Disables the specific alarm given for the given server and device at the CAS.

Parameters
contextis the TINE context
serveris the targeted server
deviceis 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.
alarmCodeis the alarm code of the alarm which should be disabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().

◆ disableAlarm() [4/4]

static int de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm ( String  context,
String  server,
String  device,
int  alarmCode,
String  cmt 
)
static

Disables the specific alarm given for the given server and device at the CAS and provide a comment (reason) for the disabling action.

Parameters
contextis the TINE context
serveris the targeted server
deviceis 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.
alarmCodeis the alarm code of the alarm which should be disabled at the Central Alarm Server
cmtis an annotation to the disabling action.
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm().

◆ disableAlarms()

static int de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms ( String  context,
String  server,
int[]  alarmCodes 
)
static

Disables the alarms in the given list for the given server at the CAS.

Parameters
contextis the TINE context
serveris the targeted server
alarmCodesis a simple array of those alarm codes which should be disabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.client.TLink.executeAndClose().

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.disableAlarm(), and de.desy.tine.alarmUtils.TAlarmSystem.disableCurrentAlarm().

◆ disableCurrentAlarm()

static int de.desy.tine.alarmUtils.TAlarmSystem.disableCurrentAlarm ( String  context,
String  server,
String  device,
int  alarmCode 
)
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!

Parameters
contextis the TINE context
serveris the targeted server
deviceis 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.
alarmCodeis the alarm code of the alarm which should be disabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.disableAlarms().

◆ enableAlarm() [1/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.enableAlarm ( String  context,
String  server,
int  alarmCode 
)
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.

Parameters
contextis the TINE context
serveris the targeted server
alarmCodeis the alarm code of the alarm which should be enabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms().

◆ enableAlarm() [2/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.enableAlarm ( String  context,
String  server,
String  device,
int  alarmCode 
)
static

Enables the specific alarm given list for the given server and device at the CAS.

Parameters
contextis the TINE context.
serveris the targeted server.
deviceis 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.
alarmCodeis the alarm code of the alarm which should be enabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms().

◆ enableAlarms() [1/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms ( String  context,
String  server 
)
static

Enables all alarms for the given server at the CAS.

Parameters
contextis the TINE context
serveris the targeted server
Returns
0 on success or a TINE Error code

References de.desy.tine.client.TLink.executeAndClose().

◆ enableAlarms() [2/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.enableAlarms ( String  context,
String  server,
int[]  alarmCodes 
)
static

Enables the alarms in the given list for the given server at the CAS.

Parameters
contextis the TINE context
serveris the targeted server
alarmCodesis a simple array of those alarm codes which should be enabled at the Central Alarm Server
Returns
0 on success or a TINE Error code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.enableAlarm().

◆ getAlarmDefinitions() [1/2]

static TAlarmDefinition [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions ( String  context,
String  server 
)
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.

Parameters
contextis the TINE context
serveris the targeted server.
Returns
an array list of alarm definitions for the input given.

References de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions().

◆ getAlarmDefinitions() [2/2]

static TAlarmDefinition [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions ( String  context,
String  server,
int  alarmCode 
)
static

Gets the alarm definition structure array.

This method gets the alarm definition structure array as registered at the Central Alarm Server

Parameters
contextis the TINE context
serveris the targeted server.
alarmCodeis the targeted alarm code. Passing a value less than zero will acquire all known alarm definitions.
Returns
an array list of alarm definitions for the input given.

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitions().

◆ getAlarmDefinitionsFromServer()

static TAlarmDefinition [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmDefinitionsFromServer ( String  context,
String  server 
)
static

Gets the alarm definition structure array from the targeted server.

This method gets the alarm definition structure array directly from the targeted server.

Parameters
context[input] is the TINE context
server[input] is the targeted server.
Returns
an array of Alarm Definitions from the targeted server.

References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getAlarms() [1/3]

static TAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarms ( String  context,
String  alarmSystem,
long  start,
long  stop,
int  severity 
)
static

Gets the alarm message structure array.

This method gets the alarm message structure array from the Central Alarm Server.

Parameters
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
Returns
an array of Alarm Messages for the input given.

References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().

◆ getAlarms() [2/3]

static TAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarms ( String  context,
String  server,
String  alarmSystem,
long  start,
long  stop,
int  severity 
)
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.

Parameters
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
Returns
an array of Alarm Messages for the input given.

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarms(), and de.desy.tine.alarmUtils.TAlarmSystem.getAlarmsFromServer().

◆ getAlarms() [3/3]

static synchronized TAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarms ( String  context,
String  server,
String  alarmSystem,
long  start,
long  stop,
int  severity,
boolean  includeTerminated 
)
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

Parameters
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
includeTerminatedspecifies whether terminated alarms are to be included or not
Returns
an array of Alarm Messages for the input given.

References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().

◆ getAlarmsFromServer()

static TAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmsFromServer ( String  context,
String  server,
long  start,
long  stop,
int  severity 
)
static

Gets the alarm message structure array from the targeted server.

This method gets the alarm message structure array from the targeted server.

Parameters
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
Returns
an array of Alarm Messages for the input given.

References de.desy.tine.alarmUtils.TAlarmSystem.getAlarms().

◆ getAlarmsWithText()

static TCASAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmsWithText ( String  context,
String  alarmSystem,
long  start,
long  stop,
int  severity,
boolean  includeTerminated 
)
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

Parameters
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
includeTerminatedspecifies whether terminated alarms are to be included or not
Returns
an array of Alarm Messages for the input given.

◆ getAlarmSystem()

static String de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystem ( String  context,
int  alarmSystemNumber 
)
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.

Parameters
context[input] is the TINE context
alarmSystemNumber[input] is the specified alarm system number for which the system name is desired.
Returns
a String containing the corresponding alarm system name.
See also
getAlarmSystems, getAlarmSystemsMap

References de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystemsMap().

◆ getAlarmSystems()

static String [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystems ( String  context)
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

Parameters
context[input] is the TINE context
Returns
a string array containing the available alarm systems
See also
getAlarmSystemsMap, getAlarmSystem

◆ getAlarmSystemsMap() [1/2]

static synchronized NAME16II [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystemsMap ( String  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).

Parameters
context[input] is the TINE context
Returns
a NAME16I array containing the available alarm systems
See also
getAlarmSystems, getAlarmSystem

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystem().

◆ getAlarmSystemsMap() [2/2]

static synchronized NAME16II [] de.desy.tine.alarmUtils.TAlarmSystem.getAlarmSystemsMap ( String  context,
boolean  acquireAll 
)
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).

Parameters
context[input] is the TINE context
acquireAll[input] if 'true' will also return alarm subsystems marked as 'hidden'
Returns
a NAME16I array containing the available alarm systems
See also
getAlarmSystems, getAlarmSystem

References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getDisabledAlarms()

static TAlarmMessage [] de.desy.tine.alarmUtils.TAlarmSystem.getDisabledAlarms ( String  context,
String  alarmSystem 
)
static

Gets the disabled alarm list for the given context and alarm system.

Parameters
contextis the TINE context
alarmSystemis the targeted alarm system
Returns
the current list of disabled alarm message types or NULL if no alarms have been disabled.

References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getNumberOfAlarms() [1/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms ( String  context,
String  server,
String  alarmSystem,
long  start,
long  stop,
int  severity 
)
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.

Parameters
contextis the TINE context
serveris the targeted server (null => Central alarm server)
alarmSystemis the targeted alarm sub system
startis the UTC start time (or a negative depth in milliseconds)
stopis the UTC stop time (or -1 if start is the depth)
severityis the lower limit for the severity filter
Returns
the number of alarms in the time interval
See also
monitorNumberOfAlarms

Referenced by de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms().

◆ getNumberOfAlarms() [2/2]

static int de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms ( String  context,
String  server,
String  alarmSystem,
long  start,
long  stop,
int  severity,
boolean  includeTerminated 
)
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.

Parameters
contextis the TINE context
serveris the targeted server (null => Central alarm server)
alarmSystemis the targeted alarm sub system
startis the UTC start time (or a negative depth in milliseconds)
stopis the UTC stop time (or -1 if start is the depth)
severityis the lower limit for the severity filter
includeTerminatedspecifies whether to include terminated alarms or not
Returns
the number of alarms in the time interval
See also
monitorNumberOfAlarms

References de.desy.tine.alarmUtils.TAlarmSystem.getNumberOfAlarms().

◆ isDisabledAlarmActive()

static boolean de.desy.tine.alarmUtils.TAlarmSystem.isDisabledAlarmActive ( String  context,
String  server,
String  device,
int  alarmCode 
)
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).

Parameters
contextis the TINE context
serveris the targeted server
deviceis the targeted device. A null string checks for all devices.
alarmCodeis the targeted alarm code.
Returns
true if the current alarm state for the disable alarm is active. If the given alarm is not disabled then this method returns false.

◆ monitorAlarms()

static TLink de.desy.tine.alarmUtils.TAlarmSystem.monitorAlarms ( String  context,
String  server,
String  alarmSystem,
int  severity,
AlarmMonitor  almMonitor 
)
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.

Parameters
contextis the TINE context
serveris the targeted server (null => Central alarm server)
alarmSystemis the targeted alarm sub system
severityis the lower limit for the severity filter
almMonitoris a AlarmMonitor object whose AlarmHandler is to be fired upon change of data
Returns
a TLink object (or null if not successful)
See also
getNumberOfAlarms, TLink.close()

The documentation for this class was generated from the following file: