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

AlarmEnable

Enables an alarm on the active alarm list. You can enable 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.

No action is taken if the alarms are already enabled. You would normally call this function from a keyboard command.

Syntax

AlarmEnable(Mode, Value [, ClusterName] )

Mode:

The type of enable:

0 - Enable a single alarm where the cursor is positioned.

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

2 - Enable a category of alarms.

3 - Enable alarms of a specific priority.

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

Value:

Used with Mode 1 and 2 to specify which alarms to enable.

ClusterName:

Used with Mode 2 or 3 to specify the name of the cluster where the alarms being enabled reside in. This argument is optional if the client is connected to only one cluster containing an Alarm Server or 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

GrpOpen, AlarmDisable, AlarmEnableRec

Example

System Keyboard

Key Sequence

Enable

Command

AlarmEnable(0, 0)

Comment

Enable the alarm where the cursor is positioned

System Keyboard

Key Sequence

ShiftEnable

Command

AlarmEnable(1, -1)

Comment

Enable a page of alarms

System Keyboard

Key Sequence

AlarmEnable ### Enter

Command

AlarmEnable(2, Arg1, "clusterXYZ")

Comment

Enable alarms of a specified category in cluster XYZ

System Keyboard

Key Sequence

EnPri ############# Enter

Command

AlarmEnable(3,Arg1, "clusterXYZ")

Comment

Enable alarms of a specific priority in cluster XYZ

See Also

Alarm Functions