Requesting/Moving XML file between server and client.|OPC UA Standard|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
Requesting/Moving XML file between server and client.
Avatar
Yi Han
Member
Members
Forum Posts: 7
Member Since:
04/11/2018
sp_UserOfflineSmall Offline
1
05/16/2018 - 08:44
sp_Permalink sp_Print sp_EditHistory

Greetings, everyone!

 

I am a Unity programmer, new to OPC UA, trying to implement OPC UA into our project.

Now with Unity & C#, I have been able to create basic working UA server and client on windows 10 platform, which means I can browse, monitor, read and write my UA server's content with my client.

 

One of our project's goal is to request XML files which documents some working procedure from our partner company's center system/UA server, which is monitoring packaging machines. In the envisaged working environment, our devices (with UA client installed) will be in the same shop floor with the server.

I am new to the OPC UA field, and haven't been able to make direct contact with the partner company's programmer. Although I have read the Part 6 specifications and some other articles, I am still not sure about how normally people in packaging industry would do, when requesting or moving XML files between UA servers and clients. My questions are:

1) how should I request the XML file? To read from a node, or call a method node?

2) what is the most common way of transporting XML file between UA server and client? It doesn't have to be from packaging Industry.

The methods I can think of are through a) array of strings, b) array of XmlElements, c) ExtensionObject or d) http web service.

3) If our device also need to move similar size of XML files back to the server/center system, should we also create a UA server installed on our device, and have the center system create a client and request for it?

 

Thank you in advance!

Yi

Avatar
Randy Armstrong
Admin
Forum Posts: 1438
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/17/2018 - 21:58
sp_Permalink sp_Print

You should look at the File ObjectType and the FileTransfer ObjectType defined in Part 5.

Avatar
Yi Han
Member
Members
Forum Posts: 7
Member Since:
04/11/2018
sp_UserOfflineSmall Offline
3
05/22/2018 - 01:32
sp_Permalink sp_Print

Thank you, that is what I am looking for!

Avatar
Yi Han
Member
Members
Forum Posts: 7
Member Since:
04/11/2018
sp_UserOfflineSmall Offline
4
05/25/2018 - 05:15
sp_Permalink sp_Print sp_EditHistory

Hi, from the Specification Part 5, I found the definitions of FileType and FileDirectoryType, and wrote a server with such structure to test.

Image Enlarger

Here are my questions:

1, Is the File1 shown in the picture the correct form of a FileType?

2, The methods shown are just void ones, should I implement the Open, Close, Write, Read, getPosition and SetPosition methods by myself, or are there other UA's APIs I don't know about that can implement these methods?

3, Where can I find some example code of how the FileType node could be created or used?

 

Thanks!

Avatar
Randy Armstrong
Admin
Forum Posts: 1438
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
5
05/26/2018 - 14:43
sp_Permalink sp_Print

1) Looks right.

2) You need to implement the methods using mechanisms defined in the SDK you are using. How methods are implemented within a server is not mandated by the specification. Note that some SDKs have help APIs that completely implement the file type. Consult with the vendor/github repo which is source of your sdk.

Avatar
Yi Han
Member
Members
Forum Posts: 7
Member Since:
04/11/2018
sp_UserOfflineSmall Offline
6
05/28/2018 - 03:23
sp_Permalink sp_Print

I am using the Foundation's SDK. I have searched every source code from Foundation's SDK, didn't find any method or class that was operating the FileType. 

This may seem silly to ask, to implement the FileType nodes, where should I look up the mechanisms defined by Foundation's SDK?

Avatar
Randy Armstrong
Admin
Forum Posts: 1438
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
7
05/28/2018 - 20:06
sp_Permalink sp_Print

You will need instantiate a FileState object and link it to the AddressSpace.

The Workshop samples should provide examples of how to add objects to the address space (Boiler) and implement Methods (Methods).

Avatar
Yi Han
Member
Members
Forum Posts: 7
Member Since:
04/11/2018
sp_UserOfflineSmall Offline
8
05/29/2018 - 08:24
sp_Permalink sp_Print

Thank you, the BoilerNodeManager is of great help!

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