OPC Data Access and OPC Alarms and Events are specifications that (with one exception) do not require *any* relation between the information provided. At least, this is true in a general case. If you have an OPC server that supports both specs, there may be a relation, but that would be server-specific.
A generic OPC Alarms&Events server may provide events that do not relate to any "item", and have no related "data value" to speak of.
For some types of events, and in some servers, of course, there is a relation of events to data items, and even related values (such as in case of limit alarms etc.). Such information is carried in event attributes. For example, a standard Level alarm will have CV (Current Value) attribute, and NEXT LIM and PREV LIM attributes. The values of these attributes are then provided with each even notification for the corresponding event category. In the event notification handler, you can access the attributes via EasyAENotificationArgs.Event.AttributeValues dictionary.
The one exception I have mentioned in the beginning is that the OPC-A&E spec actually has a provision for translating attributes to OPC-DA ItemIDs (it is the IOPCEventServer::TranslateToItemIDs function). We currently do not support this function on the client side. I think it does not impact you though, because
- Only few servers support it.
- It is only meaningful with condition events
- And mainly, the information it works with must already be available in the event attributes. So, if it is in the event attributes, it is already available to you, as described above. And if it is not, this functions will not help.
Best regards