Cicode Programming Reference > Cicode Function Categories > Alarm Functions Introduction > AlarmClear

AlarmClear

Clears an acknowledged (and off) alarm from the active alarm list. You can clear the alarm where the cursor is positioned, one or more alarm lists on the active page, a whole category of alarms, or alarms of a particular priority.

If you set the [Alarm]AckHold parameter to 1, alarms that go off and have been acknowledged are not removed from the active list until this function is called.

Syntax

AlarmClear(Mode, Value [, ClusterName] )

Mode:

The type of clear:

0 - Clear a single alarm where the cursor is positioned:

1 - Clear a page of alarms. AN alarm page can contain more than one alarm list:

2 - Clear a category of alarms:

3 - Clear alarms of a specific priority.

Alarm priority 0 indicates all priorities. Hardware alarms are not affected by priority. Set Value to the group handle to clear a group of alarms of different priorities.

Value:

Used with Mode 1 or 2 to specify which alarms to clear.

ClusterName:

Used with Mode 2 or 3 to specify the name of the cluster in which the alarms being cleared reside. This argument is optional if the client is connected to only one cluster containing an Alarm Server or you are resolving the alarm server via the current cluster context.

This argument is not required where:

This argument is enclosed in quotation marks "".

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

AlarmAck

Example

System Keyboard

Key Sequence

Clear

Command

AlarmClear(0, 0)

Comment

Clear the alarm where the cursor is positioned

System Keyboard

Key Sequence

ClearAll

Command

AlarmClear(1, -1)

Comment

Clear a page of alarms

System Keyboard

Key Sequence

AlarmClear ### Enter

Command

AlarmClear(2, Arg1, "clusterXYZ")

Comment

Clear alarms of a specified category in cluster XYZ

System Keyboard

Key Sequence

CtrlClear

Command

AlarmClear(2, 0, "clusterXYZ")

Comment

Clear categories of inactive alarms in cluster XYZ

System Keyboard

Key Sequence

ClearPri ########### Enter

Command

AlarmClear(3,Arg1, "clusterXYZ")

Comment

Clear alarms of a specific priority in cluster XYZ

See Also

Alarm Functions