LogTrackingEvent

<< Click to Display Table of Contents >>

 

LogTrackingEvent

LogTrackingEvent([Message], [ActorID], [Area], [Severity], [EventTime], [Source], [EventCategory], [EventType], [UserFields], [AlarmSourceName], [FullAlarmSourceName])

Simulates an event or an alarm and sends it straight to Alarm Server's database, without passing through an E3Alarm. Therefore, this event cannot be seen on an E3Alarm, nor can this alarm be acknowledged.

Each parameter of this method allows specifying the value of the field with the same name in the event. Event fields are fulfilled according to this method's parameters, described on the next table.

Parameters of the LogTrackingEvent method

Name

Description

Message

Text parameter that specifies the content of event's Message field. If omitted, assumes an empty String

ActorID

Optional text parameter that specifies the content of event's Operator field. If omitted, assumes the user logged on E3 Viewer, "Anonymous" if there is no user logged on, or "System" if this method's call started at the server

Area

Text parameter that specifies the content of event's Area field. If omitted, assumes an empty String

Severity

Numeric parameter that determines event's severity. If omitted, assumes the value 0 (zero), that is, high severity

EventTime

Specifies an event's timestamp. If omitted, assumes the value of the timestamp at the moment this method was used

Source

Text parameter that specifies the content of event's Source field. If omitted, assumes an empty String

EventCategory

Text parameter that specifies an event's category. If omitted, assumes an empty String

EventType

Text parameter that specifies an event's type. If omitted, it assumes the "Tracking" value

UserFields

Array-type parameter, where each position assumes the value of a user-specified field. If omitted, uses the values defined in the Collection of Alarm's User Fields of the Alarm Server

AlarmSourceName

Text parameter that specifies an Alarm Source's name. If omitted, assumes an empty String

FullAlarmSourceName

Text parameter that specifies an Alarm Source's full path, including Area, Alarm Configuration, and possible Folders where this Alarm is inserted. If omitted, assumes an empty String

 

The other event fields cannot be specified and always assume the following values:

CurrentValue: 0.0

Quality: ""

ConditionActive: 0 (False)

ConditionName: ""

SubConditionName: ""

Acked: 1 (True)

AckRequired: 0 (False)

Enabled: 1 (True)

EventTimeUTC: *Always equal to EventTime (such as in alarm events)

ChangeMask: 0 (zero)

Cookie: 0 (zero)

 

NOTE

This method fails if Alarm Server's Store alarms on a database option is not selected, or when storing data on a database fails.

 

Example:

Sub CommandButton1_Click()
  ' In UserFields parameter, for each array element,
  ' displays the value set to it
  Application.GetObject("AlarmServer1").LogTrackingEvent_
    "Button clicked", Application.User, "Operation", 2, ,_
    "Button1", , , array(1, 2, "a", "b")
End Sub

Was this page useful?