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


Searches for the next occurrence of an alarm category and type, commencing with the specified alarm record identifier (returned from the previous search through the AlarmFirstCatRec function). You can search all areas, the current area only, or specify an area to limit the search. 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. Instead use AlarmFirstTagRec() to get the record. This should be called from the server side using MsgRPC.

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.


AlarmNextCatRec(Record, Category, Type [, Area] [, ClusterName] )


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


The alarm category or group number to match. Set Category to 0 (zero) to match all alarm categories.


The type of alarms to find:

Non-hardware alarms

0 - Active alarms, that is Types 1 and 2.

1 - Unacknowledged alarms, ON and OFF.

2 - Acknowledged ON alarms.

3 - Disabled alarms.

4 - Every configured alarms, that is Types 0 to 3, plus acknowledged OFF alarms. If you choose to omit the Type, the default is 0.


The area in which to search for alarms. If you choose to omit the area, or if you set Area to -1, only the current area will be searched.


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

GrpOpen, AlarmFirstCatRec, AlarmFirstPriRec, AlarmNextPriRec, AlarmGetFieldRec, AlarmAckRec, AlarmDisableRec, AlarmEnableRec, AlarmGetThresholdRec, AlarmSetThresholdRec, MsgRPC


See AlarmAckRec

See Also

Alarm Functions