OPC UA Event Discovery|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
OPC UA Event Discovery
Avatar
Paul Cameron
New Member
Members
Forum Posts: 1
Member Since:
05/04/2022
sp_UserOfflineSmall Offline
1
04/13/2023 - 08:13
sp_Permalink sp_Print

Basic question - is it possible to discover (by browsing type information at runtime) which events are generated by a given object?

To cite a specific example, the OPC Reference Server has an object at Root -> Objects -> Boilers -> Boiler #2 with attribute "EventNotifier = SubscribeToEvents". Sure enough, instance Boiler #2 has a "HasEventSource" reference of "Simulation", which is an object of type "BoilerStateMachineType".

I can use UA Expert to subscribe to events on Boiler #2, and indeed see ProgramTransitionEventType events triggered when I cause state transitions by Call'ing the Simulation object's Halt, Reset, Resume, Start, and Suspend methods. 

Certainly, the ProgramTransitionEventType is enumerated by the server's EventTypes folder object. However, when inspecting BoilerStateMachineType and supertypes, I don't see any indication of the types of events that can be fired. 

Is it possible to discover / enumerate event types that can be fired by a given Object, or is this something that has to be "known" ahead of time? 

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/14/2023 - 08:34
sp_Permalink sp_Print

It is recommended that objects/methods that produce events use the GeneratesEvents/AlwaysGeneratesEvents non-hierarchical reference to indicate what events are produced. (see https://reference.opcfoundatio.....ocs/7#7.15). However, there are a few caveats:

1) It is recommendation, not a requirement;

2) The reference will be in the TypeDefinition and not on the instances.

3) The reference may be on a child of the TypeDefinition, such as a Method, rather than on the TypeDefinition itself.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 29
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1349
Posts: 4577