Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Custom Events
April 2, 2023
20:32, EEST
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

If anyone can help how to create custom events and how to include those events to the Sever node hierarchy?

April 3, 2023
12:18, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

The recommended way to define custom EventTypes is to use NodeSet files generated by modeling tools such as UaModeler. You can then import the information model in the NodeSet file to the Server and create Events based on the EventTypes defined in the model by using createEvent methods of the NodeManagerUaNode corresponding to the imported Namespace that contains the EventType.

Alternatively you can define the custom EventType in code. See SampleConsoleServer’s MyNodeManager’s createMyEventType and sendEvent methods for an example of defining and using custom EventType “MyEventType”. See createAlarmNode method of the same class for an example of using HasNotifier, HasCondition and HasEventSource ReferenceTypes to create Event hierarchies.

April 4, 2023
9:05, EEST
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

Thanks for the prompt response. 🙂
Getting problem while adding the custom events to server node hierarchy.
When subscribing to these custom events directly after expanding into Server node in UAExpert, I am able to receive the events, but as per the specifications it is supposed that even when we subscribe to parent node i.e., Server Node, in that case also we should receive the child node events which is the custom event node.
And I am not able to receive the child node events (custom event) when subscribing to the Server Node.
How to add these custom events under the Server node heirachy?

April 4, 2023
13:27, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

Can you describe in more detail what you’re attempting to do and how you’re attempting to do it in your Server?

If you trigger an Event with the triggerEvent methods of BaseEventTypeNode class, then the Event is always triggered for the Server Object in addition to the Source Node specified in the Event. For example, if you modify the sendEvent method of MyNodeManager class of SampleConsoleServer to use MyDevice as the Source Node of the Event, you would be able to receive the same Event by monitoring either the Server Object or MyDevice for Events.

I confirmed that this is working as excepted in both UaExpert and Prosys OPC UA Browser, so I would need to know exectly what you’re doing for it to not work as expected.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1