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

AlarmSumGet

This command is deprecated in this version of CitectSCADA. Use the AlmSummaryGetField command instead.

Gets field data from an alarm summary entry. The data is returned as a string. You identify the alarm summary entry by the Index, returned by one of the alarm summary search functions. If calling this function from a remote client, use the MsgRPC() function.

By embedding this function in a loop, you can get data from a series of alarm summary entries. To start from the oldest entry, call the AlarmSumFirst() function to get the index, and then call AlarmSumNext() in a loop. To work back from the most recent entry, call AlarmSumLast() and then AlarmSumPrev() in a loop.

You can also get the Index from the AlarmSumFind() function, which finds an alarm summary entry by its alarm record identifier and time of activation.

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

AlarmSumGet(Index, sField [, ClusterName] )

Index:

The alarm summary index (returned from the AlarmSumFirst(), AlarmSumNext(), AlarmSumLast(), AlarmSumPrev(), AlarmSumAppend(), or AlarmSumFind() function).

sField:

The name of the field from which to extract the data:

Tag

Alarm tag

AckDate

Alarm acknowledged date

AckTime

Alarm acknowledged time

Category

Alarm category

Comment

Alarm comment

DeltaTime

Alarm active time

Desc

Alarm description

Help

Help page

Name

Alarm name

OffDate

Alarm OFF date

OffTime

Alarm OFF time

OnDate

Alarm ON date

OnTime

Alarm ON time

State

Alarm state

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

Field data from the alarm summary entry (as a string).

Related Functions

AlarmSumSet, AlarmSumFirst, AlarmSumNext, AlarmSumLast, AlarmSumPrev, AlarmSumFind, MsgRPC

Example

See AlarmSumFirst

See Also

Alarm Functions