_alert_class

Attributes of alert classes (_alert_class) are always attributes for configuration and are therefore always set using dpSet() or queried using dpGet() or dpConnect().

Attribute (neutral) Type Description
_abbr langString Abbreviation for priority (e.g. A for alarm).
_ack_type int Type of acknowledgement. See constants for Alert Class "_alert_class.._ack_type" .
_archive bool Archive alerts?
_arg_list dyn_dpid List of transfer parameters for CTRL scripts
_color_c_ack string Background color string for status: CAME/acknowledged
_fore_color_c_ack string Foreground color string for status: CAME/acknowledged
_font_style_c_ack string Font style for status: CAME/acknowledged
_color_c_nack string Background color string for status: CAME/unacknowledged
_fore_color_c_nack string Foreground color string for status: CAME/unacknowledged
_font_style_c_nack string Font style for status: CAME/unacknowledged
_color_g_nack string Background color string for status: WENT/unacknowledged
_fore_color_g_nack string Foreground color string for status: WENT/unacknowledged
_font_style_g_nack string Font style for status: WENT/unacknowledged
_color_c_g_nack string Background color string for status: CAME/WENT/unacknowledged
_fore_color_c_g_nack string Foreground color string for status: CAME/WENT/unacknowledged
_font_style_c_g_nack string Font style for status: CAME/WENT/unacknowledged
_color_none string Background color string for status: no alert
_fore_color_none string Foreground color string for status: no alert
_font_style_none string Font style for status: no alert
_ctrl_c_ack string CTRL script for status: CAME/acknowledged
_ctrl_c_g_nack string CTRL script for status: CAME/WENT/unacknowledged
_ctrl_c_nack string CTRL script for status: CAME/unacknowledged
_ctrl_g_nack string CTRL script for status: WENT/unacknowledged
_ctrl_none string CTRL script for status: no alert
_delete bool Cancel or move alerts
_inact_ack bool Alerts that are no longer current must be acknowledged
_perm char Authorization level for acknowledging and commenting alerts of this alert class. The default level is 0: here anyone can acknowledge and comment..
_prior char Priority
_single_ack bool Must be individually acknowledged
_type int

Classification type

Is used for Creating and Deleting a config. _type = 0 deletes, _type = 14 (DPCONFIG_ALERT_CLASS) creates an alert class.

Constants for the ".._type" attribute

CTRL constant int value Description
DPCONFIG_NONE 0 no alert class
DPCONFIG_ALERT_CLASS 14 alert class

Alert Class "_alert_class.._ack_type"

WinCC OA has the following integer constants to specify the type of acknowledgement in more detail (dpSet()).

CTRL constant int value Description
DPATTR_ACK_DELETES 0 acknowledgement deletes
DPATTR_ACK_NONE 1 cannot be acknowledged
DPATTR_ACK_APP 2 CAME can be acknowledged
DPATTR_ACK_PAIR 3 alert pair must be acknowledged
DPATTR_ACK_APP_AND_DISAPP 4 CAME and WENT must be acknowledged

Example

Applies an alert class for a DPE:

main()
{
  dpSetWait("TestDP_1.element:_alert_class.._type",
  DPCONFIG_ALERT_CLASS,
  "TestDP_1.element:_alert_class.._archive", TRUE,
  "TestDP_1.element:_alert_class.._ack_type",
  DPATTR_ACK_APP,
  "TestDP_1.element:_alert_class.._perm",
  5,
  "TestDP_1.element:_alert_class.._prior", 60,
  "TestDP_1.element:_alert_class.._color_c_ack", "Blue",
  "TestDP_1.element:_alert_class.._color_c_nack", "Red",
  "TestDP_1.element:_alert_class.._abbr",
  "A");
}

Further details to the config "_alert_class" you will find in the chapter Module PARA - _alert_class (alert class).