Previous Topic: Context ObjectNext Topic: Map Object


Event Object

The Event object is passed to the user-defined procedures registered in OnRegistration. It represents a raw data event and its related data. Events consist of a type, a resource, a measurement time and a collection of values, as follows:

Contract

The name of the contract that contains the metric that generated the event. If the event was generated by an adapter, an empty string is returned.

ContractId

The ID of the contract that contains the metric that generated the event. If the event was generated by an adapter, the property value is 0.

ContractParty

The name of the contract party that owns the contract that contains the metric that generated the event. If the event was generated by an adapter, an empty string is returned.

ContractPartyId

The ID of the contract party that owns the contract that contains the metric that generated the event. If the event was generated by an adapter, the property value is 0.

CorrectionsApply

Returns True if the current calculation takes corrections into account.

CorrectionsFolded

Returns True if there are no corrections. The current calculation is performed for both the WithCorrections and WithoutCorrections modes.

Count

Returns the number of objects in the event.

CustomAttribute (customAttributeName)

Returns the value of the custom attribute specified in the parameter. If the attribute doesn't exist at the time of the event, an error occurs.

Note: The custom attribute is requested from the resource that originated the event and is requested for the time of the event.

Example:

Dim AttribVal
AttribVal = eventDetails.CustomAttribute "MyAttribute"

Dump

Returns a string containing all event information in a readable format.

EventId

Returns the event ID.

EventType

Returns the event type.

ExceptionsApply

Returns True if the current calculation takes exceptions into account.

ExceptionsFolded

Returns True if there are no exceptions. The current calculation is performed for both the WithExceptions and WithoutExceptions modes.

HasAttribute (customAttributeName)

Returns whether the specified attribute exists at the time of the event.

Note: The custom attribute is requested from the resource that originated the event and is requested for the time of the event.

Example:

Dim AttribExistsNow
AttribExistsNow = eventDetails. HasAttribute "MyAttribute"

IntervalLength

The interval length (in the units found in the TimeUnit property above) of the calculation that generated the event. If the event was generated by an adapter this property contains 0. If it was generated by a metric but not by its tracking period calculation, the value of this property is always 1. If it was generated by the tracking period of the metric its value is the number of TimeUnits in the tracking period.

IsTrackingPeriod

True if the event was sent from the calculation of the tracking period of some metric and false if the event was sent from other calculation of a metric or when it was sent from the adapter.

Metric

The name of the metric that generated the event. If the event was generated by adapter, an empty string is returned.

MetricId

The ID of the metric that generated the event. If the event was generated by adapter, the property value is 0.

Resource

Returns the resource name.

ResourceId

Returns the resource ID.

Sender

Returns the name of the adapter that generated this event. For an intermediate event this field contains an empty string.

Time

Returns the time of the measurement.

TimeUnit

If the event was generated by a metric this property contains the time unit of the calculation that generated the event. It can be one of the following values: “HOUR”, “DAY”, “WEEK”, “MONTH”, “QUARTER”, “YEAR”. It can also be an empty string, which means that the event was generated by an adapter.