As illustrated in the figure below, the A&E COM UA Proxy is a COM Servercombined with a UA Client. It maps the Alarmsand Conditionsaddress space of UA A & C Serverinto the appropriate COM Alarms and Event Objects.
Subclauses D.3.2through D.3.9identify the design guidelines and constraints used to develop the A&E COM UA Proxy provided by the OPC Foundation. In order to maintain a high degree of consistency and interoperability, it is strongly recommended that vendors, who choose to implement their own version of the A&E COM UA Proxy, follow these same guidelines and constraints.
The A&E COM Clientsimply needs to address how to connect to the UA A & C Server. Connectivity approaches include the one where A&E COM Clients connect to a UA A & C Serverwith a CLSID just as if the target Serverwere an A&E COM Server. However, the CLSID can be considered virtual since it is defined to connect to intermediary components that ultimately connect to the UA A & C Server. Using this approach, the A&E COM Clientcalls co-create instance with a virtual CLSID as described above. This connects to the A&E COM UA Proxy components. The A&E COM UA Proxy then establishes a secure channel and session with the UA A & C Server. As a result, the A&E COM Clientgets a COM Event Serverinterface pointer.
The A&E COM UA Proxy reads the UA A & C Serverstatus from the Server Object Variable Node. Status enumeration values that are returned in ServerStatusDataType structure can be mapped 1 for 1 to the A&E COM Serverstatus values with the exception of UA A & C Serverstatus values Unknownand Communication Fault.These both map to the A&E COM Serverstatus value of Failed.
The VendorInfo string of the A&E COM Serverstatus is mapped from ManufacturerName.
Since all Alarmsand Conditions Events belong to a subtype of BaseEventType, the A&E COM UA Proxy maps the subtype as received from the UA A & C Serverto one of the three A&E Eventtypes: Simple, Tracking and Condition. Figure D.2shows the mapping as follows:
- Those A & C Events which are of subtype AuditEventTypeare marked as A&E Eventtype Tracking.
- Those A & C Events which are ConditionTypeare marked as A&E Eventtype Condition.
- Those A & C Events which are of any subtype except AuditEventTypeor ConditionTypeare marked as A&E Eventtype Simple.
Figure D.2– Mapping UA Event Types to COM A&E Event Types
Note that the Eventtype mapping described above also applies to the children of each subtype.
Each A&E Eventtype (e.g. Simple, Tracking, Condition) has an associated set of Eventcategories which are intended to define groupings of A&E Events. For example, Level and Deviation are possible Eventcategories of the Condition Eventtype for an A&E COM Server. However, since A & C does not explicitly support Eventcategories, the A&E COM UA Proxy uses A & C Eventtypes to return A&E Eventcategories to the A&E COM Client. The A&E COM UA Proxy builds the collection of supported categories by traversing the type definitions in the address space of the UA A & C Server. Figure D.3shows the mapping as follows:
- A&E Tracking categories consist of the set of all Eventtypes defined in the hierarchy of subtypes of AuditEventType and TransitionEventType, including AuditEventType itself and TransitionEventType itself.
- A&E Conditioncategories consist of the set of all Eventtypes defined in the hierarchy of subtypes of ConditionType, including ConditionTypeitself.
- A&E Simple categories consist of the set of Eventtypes defined in the hierarchy of subtypes of BaseEventTypeexcluding AuditEventTypeand ConditionTypeand their respective subtypes.
Figure D.3– Example mapping of UA Event Types to COM A&E categories
Category name is derived from the display name Attributeof the Nodetype as discovered in the type hierarchy of the UA A & C Server.
Category description is derived from the description Attributeof the Nodetype as discovered in the type hierarchy of the UA A & C Server.
The A&E COM UA Proxy assigns Category IDs.
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
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 |