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 an Event's Message field. If omitted, assumes an empty String

ActorID

Optional text parameter that specifies the content of an Event's Operator field. If omitted, assumes the user logged on Elipse 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 an Event's Area field. If omitted, assumes an empty String

Severity

Numeric parameter that determines an 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 an 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.

 

The next example contains an example of using this method.

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?