Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Subscription not working #9

Closed
asacchettacali opened this issue Apr 18, 2023 · 4 comments
Closed

Event Subscription not working #9

asacchettacali opened this issue Apr 18, 2023 · 4 comments

Comments

@asacchettacali
Copy link

Hello,
I tried to implement the example illustrated here but unfortunately the event pub / sub doesn't seem to work on either my MacOS and Windows:

Screenshot 2023-04-18 at 15 16 35

Can you help me?
Thank you

@janbiehl
Copy link

Hey, i had the same issue. I tried to rollback to an older version and this fixed the error for me.

So i am not using the latest 2.30.0. Instead im am using 2.29.0 and the code just works without further changes.

image

@kpreisser
Copy link
Member

Hi, thanks for creating this issue! Can you try to create an OpcEventFilter and pass it to client.SubscribeEvent(), like this:

var eventFilter = OpcFilter.Using(client).FromEvents(OpcEventTypes.Event).Select();
client.SubscribeEvent(OpcObjectTypes.Server, eventFilter, HandleGlobalEvents);

There seems to be an issue in the current version of the OPC UA .NET SDK, which causes the event subscription to not work if no OpcEventFilter is specified (that defines the event fields that the server sends to the client). We are currently investiaging this issue.

Thanks!

@asacchettacali
Copy link
Author

Hello,

Thank you for the suggestion, it now works correctly.

Cheers,
Alessio

@kpreisser
Copy link
Member

Hi,
sorry that it took so long, but we have now fixed the issue that the event subscription doesn't work (since v2.29.0) when no OpcEventFilter is specified. The fix will be included in OPC UA .NET SDK v2.40.0, which we will release today or tomorrow.

Thanks again for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants