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

AlarmQueryNextRec

Searches for the next occurrence of an alarm category (or priority) and type, commencing with the specified alarm record identifier (returned from the previous search through the alarm query functions).

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.

This is wrapper function of AlarmNextCatRec and AlarmNextPriRec.

Syntax

AlarmQueryNextRec(Record, Group, Type, Area, QueryType [, ClusterName] )

Record:

Alarm record number.

Group:

Alarm Category if QueryType is 0 or alarm priority if QueryType is 1.

Type:

Type of alarms to find:

Non-hardware alarms

0 - All active alarms; that is, types 1 and 2.

1 - All unacknowledged alarms, ON and OFF.

2 - All acknowledged ON alarms.

3 - All disabled alarms.

4 - All configured alarms; that is, types 0 to 3, plus acknowledged OFF alarms.

Area:

Area in which to search for alarms. Set Area to -1 to search all areas.

QueryType:

Query type.

0 - Search by category.

1 - Search by priority.

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

AlarmQueryFirstRec

See Also

Alarm Functions