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: 633
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: 267

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 109

pramanj: 86

ibrahim: 71

kapsl: 57

gjevremovic: 49

TimK: 41

fred: 41

Fransua33: 39

Xavier: 34

rocket science: 33

Member Stats:

Guest Posters: 0

Members: 1283

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1100

Posts: 4643

Newest Members:

henryking123, pcygraig5029, corejavatuts, jaynelumpkin4, nandant07, vnd18, arnetteleverett, autumnzzi6, vickiviera, dianames129491

Moderators: Jouni Aro: 869, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 633, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Teppo Uimonen: 21, Markus Johansson: 30, Matti Siponen: 100, Lusetti: 0

Administrators: admin: 1