10:53, EEST
July 11, 2017
I am novice in this world, so please excuse for any question which may have an obvious simple answers.
I have an OPC Client Java App based on ProSys and it is initiating connection to the OPC UA server by ProSys. I have attached a UAClientListener with the client and also added subscription by providing MonitoredDataItem for items lets say Counter1 ( simulated on server). Also while creating Subscription a SubscriptionNotificationListener also attached.
Few questions:
1) What would be the data flow for subscribed data ? Currently after looking into logs, it looks OPC UA Client sending frequent PublishRequest to Server for probably subscribed data and once PublishingInterval reaches, client receives response as part of request sent to Server. Though request not reaching to server as per Server Logs so may be Client just logging it and not sending to server until PublishingInterval reaches. So please provide input on this analysis as well. Also I used to think, Server would automatically send data back to Client once PublishingInterval reaches like a call back mechanism instead of Client requesting server. Please clarify.
2) In continuation of point 1, data is being processed by UaClientListener::validatePublishResponse method. This is again a surprise to me as it should have been processed by SubscriptionNotificationListener (probably by onNotificationData method). Please guide.
Thanks in advance !
-Sumit
11:21, EEST
December 21, 2011
Thanks for good questions.
1. OPC UA does not implement direct call backs in practice, because that would require another network connection to be opened from the server to the client, which complicates the security settings, for example, too much.
Instead, there is a “polling” mechanism that actually provides the same results. The client application is sending PublishRequest messages to the server, which the server can then use whenever it needs to send a NotificationMessage (with data change or event notifications) back to the client. At that point, the server will send a PublishResponse corresponding to one of the PublishRequests sent earlier by the client.
2. UaClientListener.validatePublishResponse enables your client application to verify the PublishResponse message, in case there is something that you wish to do. In normal circumstances, you can ignore this and simply use the SubscriptionNotificationListener or MonitoredDataItemListener (or MonitoredEventItemListener) to handle the data changes (or events). MonitoredDataItemListener is plugged into individual MonitoredDataItem instances (but you can use the same listener) and provides you even simpler way to handle the individual data changes than SubscriptionNotificationListener.
Most Users Ever Online: 1919
Currently Online:
17 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: 730
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25ZofModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1