Cicode Programming Reference > Cicode Function Categories > Alarm Functions > 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.

Note: This function cannot be used with StruxureWare templates.

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

Note: This function will only work while the record is writable which is controlled by the ArchiveAfter Parameter. Refer to the topic Configure the Archiving Parameters in the main help for more information.

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

Note:Alarm commands on single clusters will return either 0 if successful or an error code if unsuccessful. Alarm commands across multiple clusters may also return a partial success result, whereby a command has been successful on 'at least' one cluster but unsuccessful on another cluster.

If this function is not called from a foreground task, it becomes a blocking function.

Syntax

INT AlarmAck(INT Mode, INT Value [, STRING ClusterName])

Mode:

The type of acknowledgment:

0 - Acknowledge a single alarm.

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.

Note:Alarm Summary page no longer supports Modes 1, 2, and 3.

Value:

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

sClusterName:

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 this function is non-blocking. Under these circumstances, 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

Published June 2018