Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-VB/ActiveX | API-Java | Examples | Downloads
Static Public Member Functions
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...

List of all members.

Static Public Member Functions

static int disableAlarm (String context, String server, int alarmCode)
 Disables the specific alarm given list for the given server at the CAS.
static int disableAlarms (String context, String server, int[] alarmCodes)
 Disables the alarms in the given list for the given server at the CAS.
static TAlarmMessage[] getDisabledAlarms (String context, String alarmSystem)
 Gets the disabled alarm list for the given context and alarm system.
static int enableAlarm (String context, String server, int alarmCode)
 Enables the specific alarm given list for the given server at the CAS.
static int enableAlarms (String context, String server, int[] alarmCodes)
 Enables the alarms in the given list for the given server at the CAS.
static int enableAlarms (String context, String server)
 Enables all alarms for the given server at the CAS.
static String[] getAlarmSystems (String context)
 Gets the alarm systems available in the given context.
static synchronized NAME16II[] getAlarmSystemsMap (String context)
 Gets the alarm systems available in the given context.
static synchronized NAME16II[] getAlarmSystemsMap (String context, boolean acquireAll)
 Gets the alarm systems available in the given context.
static String getAlarmSystem (String context, int alarmSystemNumber)
 Gets the alarm system corresponding the the alarm system number and context given.
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)
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)
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)
static TAlarmMessage[] getAlarms (String context, String server, String alarmSystem, long start, long stop, int severity)
 Gets the alarm message structure array.
static synchronized TAlarmMessage[] getAlarms (String context, String server, String alarmSystem, long start, long stop, int severity, boolean includeTerminated)
 Gets the alarm message structure array.
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.
static TAlarmMessage[] getAlarms (String context, String alarmSystem, long start, long stop, int severity)
 Gets the alarm message structure array.
static TAlarmMessage[] getAlarmsFromServer (String context, String server, long start, long stop, int severity)
 Gets the alarm message structure array from the targeted server.
static TAlarmDefinition[] getAlarmDefinitions (String context, String server, int alarmCode)
 Gets the alarm definition structure array.
static TAlarmDefinition[] getAlarmDefinitionsFromServer (String context, String server)
 Gets the alarm definition structure array from the targeted server.

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

Member Function Documentation

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

Disables the specific alarm given list for the given server at the CAS.

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

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
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
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
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:
context[input] is the TINE context
server[input] is the targeted server.
alarmCode[input] is the targeted alarm code.
ads[output] is a reference to the Alarm Definition Structure array to hold the returned data. If ads is null, the call returns the number of alarm definitions. etc.)
Returns:
the number of alarm definitions for the input given.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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
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
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: