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

AlarmAck

Acknowledges alarms. You can acknowledge 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.

This command takes the currently logged in user into account. In other words, only the alarms that the user can see are acknowledged.

You would normally call this function from a keyboard command. No action is taken if the specified alarms have already been acknowledged.

Syntax

AlarmAck(Mode, Value [, ClusterName])

Mode:

The type of acknowledgment:

0 - Acknowledge a single alarm where the cursor is positioned. Set Value to 0 (zero) - it is not used.

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

2 - Acknowledge a category of alarms:

3 - Acknowledge alarms of a specific priority.

Value:

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

ClusterName:

Used with Mode 2 or 3 to specify the name of the cluster in which the alarms being acknowledged reside. 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 code will return

Note: In some cases an error code is not returned.This function is non-blocking, and as such, any error that is detected when the alarm server processes the command will not be returned.

Related Functions

GrpOpen

Example

System Keyboard

Key Sequence

LeftButton

Command

AlarmAck(0, 0)

Comment

Acknowledge the alarm where the cursor is positioned

System Keyboard

Key Sequence

ShiftLeftButton

Command

AlarmAck(1, -1)

Comment

Acknowledge a page of alarms

System Keyboard

Key Sequence

AlarmAck ### Enter

Command

AlarmAck(2, Arg1, "clusterXYZ")

Comment

Acknowledge alarms of a specified category in cluster XYZ

System Keyboard

Key Sequence

AckPri ############# Enter

Command

AlarmAck(3,Arg1, "clusterXYZ")

Comment

Acknowledge alarms of a specific priority in cluster XYZ

! Acknowledge alarms of the specified group of categories.
FUNCTION
AckGrp(STRING CategoryGroup)
INT hGrp;
hGrp=GrpOpen("CatGroup",1);
StrToGrp(hGrp,CategoryGroup);
AlarmAck(2,hGrp, "clusterXYZ");
GrpClose(hGrp);
END

See Also

Alarm Functions