Unable to create subscription for different monitored items/nodes #1086
AshuSingh07
started this conversation in
General
Replies: 2 comments 2 replies
-
Change this: BiConsumer<UaMonitoredItem, Integer> onItemCreated =
(item, id) -> item.setEventConsumer(this::onEventReceived); to this: UaSubscription.ItemCreationCallback onItemCreated =
(item, id) -> item.setEventConsumer(this::onEventReceived); |
Beta Was this translation helpful? Give feedback.
1 reply
-
I just ran into the same problem. @kevinherron can you provide a solution? Thx! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When subscribing to different Nodes, i am getting error while passing onItemCreated parameter to subscription.createmonitoredItems(). It works well when passing this parameter for single node subscription by using
UaSubscription.ItemCreationCallback onItemCreated =
(item, id) -> item.setValueConsumer(this::onSubscriptionValue);
but fails when passing the below code for multiple node subscription. Getting error as "Requiredtype: ItemCreationCallback, provided Biconsumar" . When casting OnItemCreated to (UaSubscription.ItemCreationCallback)onItemCreated , throwing error as can not cast.
I am passing onItemCreated like this:
Beta Was this translation helpful? Give feedback.
All reactions