Top  | Previous | Next

system.alarm.shelve

Description

This function shelves the specified alarms for the specified amount of time. The paths may be either source paths, or display paths. The time can be specified in minutes (timeoutMinutes) or seconds (timeoutSeconds). If an alarm is already shelved, this will overwrite the remaining time. To unshelve alarms, this function may be used with a time of "0".

Syntax

system.alarm.shelve(path, timeoutSeconds, timeoutMinutes)

Parameters

String[] path - A list of possible source paths to search at. If a path ends in "/*", the results will include anything below that path.

Integer timeoutSeconds - The amount of time to shelve the matching alarms for, specified in seconds. 0 indicates that matching alarm events should now be allowed to pass.

Integer timeoutMinutes - The amount of time to shelve the matching alarms for, specified in minutes. 0 indicates that matching alarm events should now be allowed to pass.

Returns

nothing

Scope

All

Examples

This example assumes that data has been loaded into a table ("Table") from system.alarm.queryStatus, and it shelves the selected alarms for 5 minutes. It also assumes that it is being executed from a button's actionPerformed event.

 

table = event.source.parent.getComponent('Table')

rows = table.selectedRows
data = table.data
if len(rows)>0:
   sourcePaths = [str(data.getValueAt(r,'Source')) for r in rows]

   system.alarm.shelve(path=sourcePaths,timeoutMinutes=5) 

 

See also:

system.alarm.queryStatus