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

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

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo

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

Administrators: admin: 1