Skip to main content
Version: v4 (Stable)

SetAction

SetAction(AlarmId As Integer/String, Type As Integer, ActionType As Integer, ActionId As Integer[, ActionFlags As Integer[, ActionParam As String[, bAddAction As Boolean]]]) As Integer

Creates or modifies an action for the alarm variable designated by <AlarmId> (Numeric or alphanumeric identifier of the variable).

The <Type> parameter is a bit mask defining the event types for which the action is valid:

  • &h01 = alarm set
  • &h02 = return to normal
  • &h04 = alarm acknowledgment

The <ActionType> parameter defines the action type:

  • 0: Call of the on-call group designated by <ActionId>
  • 1: Call of the operator designated by <ActionId>

The <ActionId> parameter designates the object (call group or operator) by its identifier (Integer) or its name (String).

The optional <ActionFlags> parameter is set to 0 for standard calls. The optional parameter <ActionParam> is not used and should remain empty.

If the optional <bAddAction> parameter is TRUE (default), the action will be added to the existing action list. If it is FALSE, the action list will be reset with the new action.

Returns 0 if no error.