14:35, EEST
July 27, 2021
Hi,
Can you suggest if you have a mechanism where we can list all subscriptions and related monitored items with their status, using prosys?
In our client application we have lot many subscriptions and each having hundreds to 1000 of monitored items. We want a mechanism to monitor all these, so that if anything has gone bad, for any of the node, we can take preventive steps and correct them, so we will not miss any data.
Also, as a next step if a subscription or monitored item has gone bad, do we have methods to add or correct the monitored item and subscriptions?
Let me know the right way to do this.
Thanks!
15:01, EEST
Moderators
February 11, 2020
Hello,
What do you mean when you say that a Subscription or a MonitoredItem “has gone bad”?
To get a list of all Subscriptions, you can call client.getSubscription() where client is an instance of UaClient class. To get all MonitoredItems of a Subscription, you can call subscription.getItems() where subscription is instance of Subscription class. The MonitoredItems are returned in MonitoredItemBase form which you can cast to MonitoredItem form to read their error code swith item.getErrorCode() where item is an instance of MonitoredItem class.
You can also use the onDataChange method of MonitoredDataItemListener interface to perform an action when the StatusCode of a received DataValue is Bad for a MonitoredDataItem.
15:30, EEST
July 27, 2021
Thanks for the inputs.
When I meant ‘has gone bad’, it could be things like it is not connected to the server or it stopped getting response or if node is bad or some error while receiving data etc.
So, we can implement something like a health screen or list of details where we say to the user, we are connected and receiving data for these nodes and are healthy.
15:50, EEST
Moderators
February 11, 2020
Hello,
You could probably use SubscriptionAliveListener interface to monitor whether or not a Subscription is alive or not. Particularly onTimeout and onLifetimeTimeout are triggered for different types of timeouts and onAlive is triggered when receiving alive messages from the Server.
MonitoredItems themselves don’t have a concept of being alive or not in the OPC UA Specification. Or in other words, the specification doesn’t define a type of notification that the Server would send to inform that the MonitoredItem is still alive but its value hasn’t changed. But you can use the previously mentioned MonitoredDataItemListener interface to handle DataValues with Bad StatusCodes.
Most Users Ever Online: 1919
Currently Online:
13 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: 737
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6451
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1