Skip to main content
Version: 8.1

system.alarm.shelve

This function is used in Python Scripting.

Description​

This function shelves the specified alarms for the specified amount of time. The time can be specified in minutes (timeoutMinutes) or seconds (timeoutSeconds). If an alarm is already shelved, this will overwrite the remaining time. If no timeout is specified, will default to 15 minutes.

Client Permission Restrictions​

Client Permission: Alarm Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax​

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

Parameters​

TypeParameterDescription
List[String]pathA list of possible source paths to search at. If a path ends in "/*", the results will include anything below that path.
IntegertimeoutSecondsThe amount of time to shelve the matching alarms for, specified in seconds. Setting this to 0 will unshelve the alarms. [optional]
IntegertimeoutMinutesThe amount of time to shelve the matching alarms for, specified in minutes. Setting this to 0 will unshelve the alarms. [optional]

Returns​

Nothing

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1
# 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)