|pMe||(Object) Reference to the PmaAlarmGroup object where the event rises.|
|pEvent||(Object) Reference to object describing detailed information about the specific event.|
pEvent.Action - (String) Specifies the selected action over the alarm item.
ack - The user selected the acknowledgement of the selected alarm item in the state viewer.
ackall - The user selected the acknowledgement of all alarm items in the state viewer.
pEvent.ItemId - (String) The identifier of the selected alarm item (if it doesn't go about multiple operation).
pEvent.TimeOn - (Date) The rise time of the selected alarm item (if it doesn't go about multiple operation). It goes about supplementary information to the identifier of the alarm item, that allows unambiguous idenfication of the selected alarm item. If it is allowed to store inactive, unacknowledged (blue) alarms in the "Number of inactive, unacknowledged alarms (blue) to keep" configurator, then more alarm items can have the same identifier.
pEvent.Context - (Object) Reference to the object containig additional information about the user, that executed the action followed by calling this event. The creation and demise of the alarm is always done by the local user. The alarm acknowledgement can be executed both by local and network application user (e.g. from the Web). The user info can be used, for example, for enabling/disabling the action (if possible), or for entering the user info into the alarms/events.
pEvent.Context.User - Reference to the PmUser object, containing detailed information about the user (local or network), that executed the action that called the method.
Caution! In order to keep the subobject User value trustworthy it is necessary to exclude the pseudo-groups $ANY and $ANY_NET from the appropriate "WebRead" permission (i.e. to ensure that the user is logged in when opening the Web pages).
Pm.Debug("Alarm - Action=" + pEvent.Action + ", itemId=" + pEvent.ItemId + ", -> user=" + pEvent.Context.User.Id + ", Time=" + Now());
var sVarName, sUserName;
var oItem = pMe.Item(pEvent.ItemId);
var oExt = oItem.Extension();
if (oExt && oExt.ClassName == "ExtAlarmBinary")
sVarName = oExt.Var.Name;
sUserName = pEvent.Context.User.Name;