NodeId in Async read callback.|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
NodeId in Async read callback.
Avatar
Curious Mind
Member
Members
Forum Posts: 4
Member Since:
09/05/2018
sp_UserOfflineSmall Offline
1
09/05/2018 - 07:20
sp_Permalink sp_Print

I am trying to read values from OPC UA server asynchronously. In the callback of the read async, how can i get the details of the NodeId. I get the values read from the server but unable to get the NodeId details namespaceIndex, indentifierType, identifier. Is there any example i can look for.

Thanks.

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/05/2018 - 16:11
sp_Permalink sp_Print

You need to save that information when you make the call. The server does not return information that the client provided in the request.

Avatar
Curious Mind
Member
Members
Forum Posts: 4
Member Since:
09/05/2018
sp_UserOfflineSmall Offline
3
09/06/2018 - 05:29
sp_Permalink sp_Print

Suppose i send request to read 5 values with a vector of 5 NodeIds in the read request, and when i get the response is a vector of 5 DataValue, if the NodeIds are not returned then how to associate DataValue with respective NodeIds?

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
09/06/2018 - 10:40
sp_Permalink sp_Print sp_EditHistory

The order of DataValue in responses exactly match the order of NodeIds in the request so you can use the array index.

This is a design pattern that is used consistently in OPC UA services.

Avatar
Curious Mind
Member
Members
Forum Posts: 4
Member Since:
09/05/2018
sp_UserOfflineSmall Offline
5
09/06/2018 - 12:40
sp_Permalink sp_Print

Thanks for this useful information.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 16
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855