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
What is the best way to monitor all subscriptions and monitored items in each subscriptions in client application?
June 6, 2022
14:35, EEST
Avatar
amj005
Member
Members
Forum Posts: 33
Member Since:
July 27, 2021
sp_UserOfflineSmall Offline

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!

June 6, 2022
15:01, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

June 6, 2022
15:30, EEST
Avatar
amj005
Member
Members
Forum Posts: 33
Member Since:
July 27, 2021
sp_UserOfflineSmall Offline

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.

June 6, 2022
15:50, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 679

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1