![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
06/11/2016
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Hi there,
I'm developing a small OPC UA Client (using .NET SDK) to access COM AE Server through the COMServerWrapper included in .NET SDK. The AE Server offers some different event types with additional event information accessible through attributes.
Now, when I create a subscription to the wrapped AE Server in my client, I get the events as COMAEBaseEventType with the fields (eventId, eventType, severity, etc...). The eventType field points to a subtype node, named after the correct AE event type. If I'm browsing this eventType, I see the AE event attributes as properties of type variable.
If I'm getting the monitoredItem.Notification as EventFieldList I only see the standard AE event fields. The question is, how do I "cast" this notification to the correct event type and read the special attributes?
I created some types with the ModelCompiler representing the different event types, but see no possibility to use these types. A little advice would be appreciated.
Greetings
Jan Herchenröder
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/moderatordefault.png)
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Jan,
I few comments - .Net SDk? the OPC Foundation posts just sample code, I'm assumming that is what you are referring to?
The COM AE Server wrapper available as part of the sample code will need some customization to make sure it includes you additional attributes that are available in the AE Server. By Model compiler I'm assumming the OPC Foundation model compiler, which generates code and nodeset xml files for a server (so this will help you get the wrapper to expose the additional fields).
The sample AC client generates a subscription for events, as part of this subscription you specify which fields you would like from the events. The default is just a subset of the available fields. Did you add the additional fields you are looking for to the subscription?
Once all of this is correct you should see all of the fields you are looking for.
Paul
Paul Hunkar - DSInteroperability
1 Guest(s)