Extensibility > CtAPI > Function Reference > CtAPIAlarm

CtAPIAlarm

Provides an interface into the alarm summary archive from external applications. For performance improvements, use the AlmQuery function instead.

To establish the query and return the first record, you call ctFindFirst. Then, to browse the remaining records, you call ctFindNext. To access the data of the current record, ctGetProperty is called for each field of the record.

ctFindFirst is called with the following parameters:

The szTableName is the command string for the query and contains the parameters for the query.

Syntax

CTAPIAlarm(Category,Type,Area)

Note:Arguments needs to be comma-separated. Spaces between arguments are supported but not necessary. We recommend no spaces between arguments as they require more processing and take up more space in the query string.

Category:

The alarm category or group number to match. Set Category to 0 (zero) to match every alarm categorie.

Type:

The type of alarms to find:

Non-hardware alarms

If you do not specify a Type, the default is 0.

Area:

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

To simplify the passing of this argument, you could first pass the CTAPIAlarm() function as a string, then use the string as the szTableName argument (without quotation marks).

Published June 2018