问题
I want to Download and Upload, for example a .txt file, with the UA-Expert Client to/from a Server which i have set up on a Device. Could someone provide me a Step by Step solution or an example on how to implement this?
I first followed the tutorials from the open62541 website. I tried to follow and understand the OPC-UA-Specifications, particularly Part 5 Annex C.
Thank you in Advance.
回答1:
open62541 doesn't support this out of the box meaning that there is no pre-made plugin which implements the required Objects for the various platforms.
That said it isn't to much work to do it yourself (especially if you don't need something generic/cross platform). I've done such a one-off a few months ago. It was like 2 days of work. It was limited to downloading specific files from the server.
If my memory serves me well all you need to do is to enable the generation of the types specified by part5/annex c (there is a .txt or .csv in the sourcetree containing all the types that should be generated), after that you need to instantiate such an object (File for example) and place it somewhere in your server address space. What is left to do is to implement the various methods (open, read, ...) And to hook up your objects with callbacks to these.
来源:https://stackoverflow.com/questions/57685714/how-to-transfer-files-from-opc-ua-client-to-server