8:29, EET
June 27, 2018
Is it possible to create several subscriptions for which only ONE publish event is generated?
We have seen at protocol level that a Siemens PLC virtually combines several subscriptions with the same PublishingInterval and SamplingInterval. The PublishRequests are answered with a SINGLE PublishResponse containing an array of MonitoredItemNotifications.
In the Java program, I set the same MDIListener object for each MonitoredDataItem. However, each subscription receives its own onDataChange event.
Our goal is to create multiple subscriptions and have them behave like a single subscription to a structure/variable.
Is this possible?
9:30, EET
April 3, 2012
Hi,
I will assume some OPC UA terms were mixed in the question, because using the literal interpretation it would be impossible in the “protocol OPC UA level” to do any sort of “merging” of Subscriptions. A single PublishResponse (https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.5) is always keyed to a single subscriptionId i.e. it would not be possible to “merge” 2 different subscription notifications that is sent to the client.
However please note that in OPC UA the term ‘Subscription’ means a collection of MonitoredItems. Thus you most likely would be interested in com.prosysopc.ua.client.SubscriptionNotificationListener.onNotificationData(Subscription, NotificationData) attached to the Subscription object if you wish to handle the notification in “bulk style”. SDK just also splits this data automatically for you for the item-level MonitoredDataItemListener.
Note that in general for most use-cases the item-level listener is all that should be needed. OPC UA doesn’t give any “atomic guarantees” between the items. For example, if you have received the newest values, then on the server side the node updates, the sampler might run at the same time and you will get a notification with just some of the nodes. Then on next sampling (+publishinterval) you would get the rest. And for example if the data changes constantly you might get the newest value for some of the nodes but the “second newest” for some for a similar kind of scenario with the sampling. The only way to get a true snapshot would be to use a Structure type on a single node in the server and have that hold all data. Note that it is server-specific how the sampling works. Also, depending on the parameters of the Subscription and the server, if there are a lot of items a single notification might not hold all data changes, you might get multiple ones for a single publish interval.
If that didn’t help then I would need some clarifications on the question.
Most Users Ever Online: 1919
Currently Online:
59 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1