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: 349
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: 349
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: 1919

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1