The collection of Attributes associated with any given A&E Eventis encapsulated within the ONEVENTSTRUCT. Therefore, the A&E COM UA Proxy populates the Attributefields within the ONEVENTSTRUCT using corresponding values from UA Event Notifications either directly (e.g., Source, Time, Severity) or indirectly (e.g., OPC COM Eventcategory determined by way of the UA Eventtype). Table D.5lists the Attributes currently defined in the ONEVENTSTRUCT in the leftmost column. The rightmost column of Table D.5indicates how the A&E COM UA proxy defines that Attribute.

Table D.5– Event category attribute mapping table

Condition Eventinstance records are stored locally within the A&E COM UA Proxy. Each record holds ONEVENTSTRUCT data for each EventSource/Conditioninstance. When the Conditioninstance transitions to the state INACTIVE|ACKED, where AckRequired = True or simply INACTIVE, where AckRequired = False, the local Conditionrecord is deleted. When a Condition Eventis received from the UA A & C Serverand a record for this Event(identified by source/Conditionpair) already exists in the proxy Condition Eventstore, the existing record is simply updated to reflect the new state or other change to the Condition, setting the change mask accordingly and producing an OnEvent callback to any subscribing Clients. In the case where the Clientapplication acknowledges an Eventwhich is currently unacknowledged (AckRequired = True), the UA A & C ServerAcknowledge Methodassociated with the Conditionis called and the subsequent Eventproduced by the UA A & C Serverindicating the transition to acknowledged will result in an update to the current state of the local Conditionrecord as well as an OnEvent Notificationto any subscribing Clients.

The A&E COM UA Proxy maintains the mapping of Attributes on an Eventcategory basis. An Eventcategory inherits its Attributes from the Propertiesdefined on all supertypes in the UA EventType hierarchy. New Attributes are added for any Propertiesdefined on the direct UA Eventtype to A&E category mapping. The A&E COM UA Proxy adds two Attributes to each category: AckComment and Areas. Figure D.4shows an example of this mapping.

image046.png

Figure D.4– Example mapping of UA Event Types to A&E categories with attributes

A&E ONEVENTSTRUCT “attribute”

A&E COM UA Proxy Mapping

The following items are present for all A&E event types

szSource

UA BaseEventType Property: SourceName

ftTime

UA BaseEventType Property: Time

szMessage

UA BaseEventType Property: Message

dwEventType

See Clause D.3.3

dwEventCategory

See Clause D.3.4

dwSeverity

UA BaseEventType Property: Severity

dwNumEventAttrs

Calculated within A&E COM UA Proxy

pEventAttributes

Constructed within A&E COM UA Proxy

The following items are present only for A&E Condition-Related Events

szConditionName

UA ConditionType Property: ConditionName

szSubConditionName

UA ActiveState Property: EffectiveDisplayName

wChangeMask

Calculated within Alarms and Events COM UA proxy

wNewState: OPC_CONDITION_ACTIVE

A & C AlarmConditionType Property: ActiveState

Note that events mapped as non-Condition Events and those that do not derive from AlarmConditionType are set to ACTIVE by default.

wNewState: OPC_CONDITION_ENABLED

A & C ConditionType Property: EnabledState

Note, Events mapped as non-Condition Events are set to ENABLED (state bit mask = 0x1) by default.

wNewState: OPC_CONDITION_ACKED

A & C AcknowledgeableConditionType Property: AckedState

Note that A & C Events mapped as non-Condition Events or which do not derive from AcknowledgeableConditionType are set to UNACKNOWLEDGED and AckRequired = False by default.

wQuality

A & C ConditionType Property: Quality

Note that Events mapped as non-Condition Events are set to OPC_QUALITY_GOOD by default.

In general, the Severity field of the StatusCode is used to map COM status codes OPC_QUALITY_BAD, OPC_QUALITY_GOOD and OPC_QUALITY_UNCERTAIN. When possible, specific status' are mapped directly. These include (UA => COM):

Bad status codes

Bad_ConfigurationError => OPC_QUALITY_CONFIG_ERROR

Bad_NotConnected => OPC_QUALITY_NOT_CONNECTED

Bad_DeviceFailure => OPC_QUALITY_DEVICE_FAILURE

Bad_SensorFailure => OPC_QUALITY_SENSOR_FAILURE

Bad_NoCommunication => OPC_QUALITY_COMM_FAILURE

Bad_OutOfService => OPC_QUALITY_OUT_OF_SERVICE

Uncertain status codes

Uncertain_NoCommunicationLastUsableValue => OPC_QUALITY_LAST_USABLE

Uncertain_LastUsableValue => OPC_QUALITY_LAST_USABLE

Uncertain_SensorNotAccurate => OPC_QUALITY_SENSOR_CAL

Uncertain_EngineeringUnitsExceeded => OPC_QUALITY_EGU_EXCEEDED

Uncertain_SubNormal => OPC_QUALITY_SUB_NORMAL

Good status codes

Good_LocalOverride => OPC_QUALITY_LOCAL_OVERRIDE

bAckRequired

If the ACKNOWLEDGED bit (OPC_CONDITION_ACKED) is set then the Ack Required Boolean is set to False, otherwise the Ack Required Boolean is set to True. If the Eventis not of type AcknowledgeableConditionTypeor subtype then the AckRequired Boolean is set to False.

ftActiveTime

If the Eventis of type AlarmConditionTypeor subtype and a transition from ActiveStateof False to ActiveStateto True is being processed then the TransitionTime Propertyof ActiveStateis used. If the Eventis not of type AlarmConditionTypeor subtype then this field is set to current time.

Note: Additional logic applies to exclusive limit alarms, This value should be mapped to the LimitState.TransitionTime.

dwCookie

Generated by the A&E COM UA Proxy. These unique Condition Eventcookies are not associated with any related identifier from the address space of the UA A & C Server.

The following is used only for A&E tracking events and for A&E condition-relate events which are acknowledgement notifications

szActorID

Vendor specific Attributes– ALL

ACK Comment

AREAS

All A&E Events are assumed to support the "Areas" Attribute. However, no Attribute or Property of an A & C Event is available which provides this value. Therefore, the A&E COM UA Proxy initializes the value of the Areas Attribute based on the MonitoredItem producing the Event. If the A&E COM Client has applied no area filtering to a Subscription, the corresponding A & C Subscription will contain just one MonitoredItem – that of the UA A & C Server Object. Events forwarded to the A&E COM Client on behalf of this Subscription will carry an Areas Attribute value of empty string. If the A&E COM Client has applied an area filter to a Subscription then the related UA A & C Subscription will contain one or more MonitoredItems for each notifier Node identified by the area string(s). Events forwarded to the A&E COM Client on behalf of such a Subscription will carry an areas Attribute whose value is the relative path to the notifier which produced the Event (i.e., the fully qualified area name).

Vendor specific Attributes – based on category

SubtypeProperty1

All the UA A & C subtype Propertiesthat are not part of the standard set exposed by BaseEventTypeor ConditionType

SubtypePropertyn