02/19/2024
The most fundamental question is whether it is possible to learn which events an object generates during runtime by inspecting its type information.
Attribute "EventNotifier = SubscribeToEvents" is present in the OPC Reference Server object located at Root -> Objects -> Boilers -> Boiler #2, to provide a concrete example. To confirm, the "HasEventSource" reference for instance #2 Boiler is "Simulation," a "BoilerStateMachineType" object.
When I call the Halt, Reset, Resume, Start, and Suspend methods on the Simulation object, I can observe ProgramTransitionEventType events triggered on Boiler #2, and I can also use UA Expert to subscribe to these events.
It is true that the server's EventTypes folder object lists the ProgramTransitionEventType. On the other hand, I couldn't see any indication of the possible event types when I looked at BoilerStateMachineType and its supertypes.
Is it feasible to find out what kinds of events an object can trigger, or is this something that needs to be "known" in advance?
10/18/2019
Hi Randy,
I guess, at application level, someone can use GeneratesEvent reference on the Object or ObjectType to list all possible events but still it is NOT guarantee or mandatory that the object can only trigger those listed events.
In some sense, it is more of a requirement of the Object for the given application.
1 Guest(s)