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

AlarmNextTagRec

Searches for the next occurrence of an alarm tag, name, and description, starting with the alarm record identifier (returned from the previous search through the AlarmFirstTagRec() function). If calling this function from a remote client, use the MsgRPC() function.

This function returns an alarm record identifier that you can use in other alarm functions, for example, to acknowledge, disable, or enable the alarm, or to get field data on that alarm.

Note: Record numbers obtained from AlarmGetDsp are not valid for this function.

When the Alarm Server is not in the calling process, this function will become blocking and cannot be called from a foreground task. In this case, the return value will be undefined and a Cicode hardware alarm will be raised.

Syntax

AlarmNextTagRec(Record, Tag, Name, Description [, ClusterName] )

Record:

The alarm record number, returned from any of the following alarm functions:

To store this value, use data type Int in Cicode or Long for variable tags (Long needs 4 bytes).

Tag:

The alarm tag to be matched. Specify an empty string (" ") to match all alarm tags.

Name:

The alarm name to be matched. Specify an empty string (" ") to match all alarm names.

Description:

The alarm description to be matched. Specify an empty string (" ") to match all alarm descriptions.

ClusterName:

Specifies the name of the cluster in which the Alarm Server resides. This is optional if you have one cluster or are resolving the alarm server via the current cluster context. The argument is enclosed in quotation marks "".

Return Value

The alarm record identifier or -1 if no match is found.

Related Functions

AlarmFirstTagRec, AlarmGetFieldRec, AlarmAckRec, AlarmDisableRec, AlarmEnableRec, AlarmGetDelayRec, AlarmGetThresholdRec, AlarmSetThresholdRec, MsgRPC

Example

See AlarmDisableRec.

See Also

Alarm Functions