How to implement a file download from Client to Server|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
How to implement a file download from Client to Server
Avatar
Martin Lang
Germany
Member
Members
Forum Posts: 72
Member Since:
06/25/2014
sp_UserOfflineSmall Offline
1
06/27/2016 - 00:56
sp_Permalink sp_Print

Hello all,

an import requirement for our server implementation shall be to download a file from the client to the server. 

Is the assumption right to realize this requirement with the specified UA Programs (UA Spec. Part 10)?

How is it possible to tell the Client, that a file should be used from it's hard disk?

Something like the well-known dialog to refernce the file from the HDD.

Is there some sample server available, which use UA Programs or even a file up- or download?

 

Regards,

Martin

Avatar
Guest
Guests
2
06/28/2016 - 04:25
sp_Permalink sp_Print

Hello Martin,

The file object, available with version 1.03 of UA Part 5, may be the proper solution for your download requirement. It defines a UA ObjectType with Methods using the well-known file pattern as template.

Unfortunately, I am not aware of any samples for file download.

 

From your write-up I understand that the initiative starts with the Server, asking the Client to pick a file from HDD and transfer it to the Server. If I understood it right you would want to define a new event ("FileDownloadRequestEvent") with two properties "file name" (the name of the file that the Server needs) and "file object" (the NodeId of the File Object in the Server that the Client shall use for the download).

When the Client receives this event it will open the file on HDD, then call the "Open" method on the Server's file object and then perform the download.

Hope this is useful to some extent.

-Karl

Avatar
Martin Lang
Germany
Member
Members
Forum Posts: 72
Member Since:
06/25/2014
sp_UserOfflineSmall Offline
3
06/28/2016 - 22:16
sp_Permalink sp_Print

Hello Karl,

thanks for your detailed answer. This is exalty the UA Spec. part what we are looking for in relation to a file download!
My description to tell a client to do this action is unfortunately wrong.
Our current considerations are to pick-up a file f.e. in the clients GUI and start the download from the client-side, too.
In this case the file could be represent as an Object from ObjectType FileType with the approprioated methods. The file download could be done by the method-sequence open-(set position)-write-close, is this right? Or is there a smarter way specified?

Regards
Martin

Avatar
Guest
Guests
4
06/29/2016 - 23:24
sp_Permalink sp_Print

Martin,

the way you described it is appropriate if the initiative is on the Client side (the user).

 

-Karl

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