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
EventFilter not working
March 29, 2021
15:43, EEST
Avatar
sf4hmi
Member
Members
Forum Posts: 4
Member Since:
April 20, 2020
sp_UserOfflineSmall Offline

I am using Prosys Java Client SDK version 4.5.4-1405 to communicate with a UA Server based on open62541. There are 3 events under a custom Object node which I’m subscribing to. For each event, I create a separate MonitoredEventItemListener and define the EventFilter to filter according to the event’s object type. It seems simple, just like the Prosys’s example in SampleConsoleClient. However each time I receive an event, all listeners receive the same events. What could I have done wrong? Or could it be a wrong implementation on the server-side?

Thank you for any help,
Fahmi

April 6, 2021
12:38, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Could it be possible to show some code in how you made the Monitored items and filters? I assume that you did 3 separate MonitoredItems, each with different filter and then added a (different) listener to each of them (once)? (or alternatively you could add one listener to all of them, but you would need to look from the “MonitoredEventItem monitoredItem” parameter which item it was)

Without exactly seeing the address space and your filter definitions, I’ll have to guess. Unless you have used a FilterOperator.OfType in the WhereClauses of the filter (and note that the SampleConsoleClient negates it with the Not FilterOperator thus you need to remove this part), all items would receive all of them (that is to say, it is not enough to define fields that would be related to a specific type, those will get null values instead if a particular event doesn’t have those BrowsePaths).

IF that was the case, then it basically would have to be a server issue (I guess as always if you can, best is to check with https://www.prosysopc.com/blog/opc-ua-wireshark/ what the server actually sent), since all we do is pass the EventFilter when the item is created (i.e. added to the Subscription) and then it is upto the server to send the data correctly, i.e. the “Variant[] eventFields” onEvent in the MonitoredEventItemListener are in the order you defined the fields to the EventFilter’s SelectClauses, but all the filtering is done in the server’s side, we just delegate the data to the listener.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
7 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

TimK: 41

Member Stats:

Guest Posters: 0

Members: 677

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

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

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