I am developing a OPC UA Client Application which reads a file stored on a OPC UA Server. For testing Purpose i need a OPC UA Server simulator where i can add nodes of FileType and configure those nodes.
Currently i am using Prosys OPC UA Server Simulator where i can add a node of variable type but not of file type.
Just to be sure when it comes to a node that has a "HasTypeDefinition" reference to "FileType", it is an "Object" node (Object of type FileType) and not a "Variable" node.
I have seen reusable items in node-opcua stack and UA-.NETStandard stack to achieve what you are trying to do. If you can spend about a day with UA-.NETStandard stack, you might be able to accomplish what you are trying to do. ReferenceServer application in the UA-.NETStandard stack can be a good starting point.
You will have to instantiate an "Object" node of type "FileType" in the ReferenceNodeManager.cs file inside CreateAddressSpace() function definition. In a similar usecase, I have successfully instantiated an "Object" node under the Objects Folder with "HasTypeDefinition" reference to "FileType" and have used the same for File Transfer operations.
Hope this answers your question. Thank you.
If you are looking for any other hands-on information, you can check out these resources:
You should try with the new version 5 of Prosys OPC UA Simulation Server. It enables you to add objects of any type - although it doesn't let you configure any files behind the FileType.
For that, you could just try the Prosys OPC UA SDK for Java. The free evaluation version comes with a sample server that can serve files as well. (And yes, I work for Prosys OPC...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With