![sp_Feed](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_Feed.png)
![sp_PrintTopic](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_PrintTopic.png)
![sp_TopicIcon](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_TopicIcon.png)
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
10/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
HI,
I need to validate a scenario where, OPC UA Server will return a Structure as output argument of the method call.
I tried some available clients but that DO NOT work.
The scenario is, the output argument is defined as BaseDataType in the nodeset file and OPC UA Server will send the required structure type (this type is also defined in the Address Space -> Types).
When the output argument definition is BaseDataType, the available generic clients are NOT able to decode the information and I need to validate if the information is correctly sent from the OPC UA Server which is implementing one of the CS we have developed.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/admindefault.png)
05/30/2017
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
If you use custom structures as method arguments then many clients will need knowledge of the method/structures to handle it properly.
A few generic clients may be able to handle it by reading the DataTypeDefinition even if they can parse they would not understand the semantics of the structure.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
10/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Yes, but if the custom structure is already a defined DataType inherited from Structure?
I was able to use UA Client where it was able to parse the data if I set the data type to concrete type for the Array of Structures.
But when I give it as Array of BaseDataType and Server sent the concrete type inside the array, then the client was NOT able to parse it.
One more thing is UA Client which I used was able to show the the Attributes window (Read Response) all the values but in the Monitored Item Window Pop-up it was NOT able to parse that information..
Hence, it might be a GUI thing but from application point of view, I want to validate if I can receive the Array of Structures sent as BuiltIn Type Array of BaseDataType in both Read Response and Monitored Item.[Image Can Not Be Found].
The same monitored item which works in the ReadResponse (Attributes Window), does NOT work in the Method output argument.
So, I just wanted to know if there is any open source client which I can use to do some basic validation of the complex type output argument.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
02/24/2014
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
I believe that our client library (QuickOPC: https://www.opclabs.com/produc.....mplex-data ) will be able to do that. And if not, I am ready to fix it, possibly in cooperation with you.
If the input arguments to the method are simple types, you may use the pre-built OpcCmd utility (made with the QuickOPC library) to test it out: https://kb.opclabs.com/Tool_Do.....md_Utility . Otherwise, it might be necessary to write a small program to invoke the method. Or, if you send me the server or open an endpoint, I will test it myself.
An example command to call a method is:
uaClient call //opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10755 nsu=http://test.org/UA/Data/;i=10756 [Boolean]False [SByte]1 [Byte]2 [Int16]3 [UInt16]4 [Int32]5 [UInt32]6 [Int64]7 [UInt64]8 [Float]9 [Double]10
Best regards
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
10/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Hi,
Thank you for your reply. I cannot open an endpoint since it is built in our internal systems and I do not have a cloud based option to expose now.
My input arguments are simple types but the output argument is a BaseDataType which will be assigned with a custom structure defined in the address space.
I can share the binary file of the server if that is fine.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/admindefault.png)
05/30/2017
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
But when I give it as Array of BaseDataType and Server sent the concrete type inside the array, then the client was NOT able to parse it.
This is a limitation of the client.
All the information that client needs to parse it is available.
It appears to be an edge case that is not supported.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
10/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Thank you Randy, I understand that.
For that reason, I wanted to check if there were any available clients for quick validation.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
10/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
@Zbynek Zahradnik, The following link has the OPC UA Test Server Binary which exposes the example Structure mentioned.
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
02/24/2014
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
I tested calling the method form our client (OpcCmd utility).
It did not work originally, but not because of the reason discussed (related to BaseDataType), but due to other, relatively minor issues, that had to do with less frequent encodings (for record, they were: Guids, LocalizedText, and null arrays). After fixing those, I was able to call the method and get the output argument just fine.
I have updated the OpcCmd tool available on the Web (the link posted earlier) with the version with the fixes.
You can use the following command to call the method and view the output argument:
uaClient call //localhost:40451 ns=1;s=/ObjectsFolder/1_Handheld_TighteningSystem/ResultManagement ns=1;s=/ObjectsFolder/1_Handheld_TighteningSystem/GetLatestResult [Int32]10000 --!extractElement 1 --!viewValue=::D99
I originally wanted to post the output here, but it is quite long; I will email it to @Mohit Agarwal instead.
Best regards
1 Guest(s)