Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Support for writing or call method for complex data type value
January 7, 2019
8:22, EET
Avatar
amrendra04
New Member
Members
Forum Posts: 1
Member Since:
January 7, 2019
sp_UserOfflineSmall Offline

Hi,

I am evaluating Prosys Java SDK client library.
I want to read/write and call method for complex data type value.
Does the Prosys Simulation Server has any node on which i can write complex data type value or a call method which takes complex data type as argument?
Also, does Prosys Java SDK client library support write and call method for complex data type?

Thanks in advance.

January 9, 2019
13:58, EET
Avatar
Teppo Uimonen
Member
Members
Forum Posts: 21
Member Since:
November 28, 2018
sp_UserOfflineSmall Offline

Hi,

Prosys OPC UA Java SDK supports Structures (complex types), writing them and having them as method call arguments. In practice, you will need the NodeSet2 XML format model defining your custom types, and then to use our codegen to create the corresponding classes. This is explained in the Java SDK documentation.

Currently, Simulation Server doesn’t unfortunately contain nodes where you could write a Structure or include one as an argument. I suggest you have a look at Unified Automation’s demo servers which do include more Structure examples. You can find the demo servers here: https://www.unified-automation.com/downloads/opc-ua-servers.html

December 19, 2019
17:04, EET
Avatar
Lukas
Member
Members
Forum Posts: 5
Member Since:
November 20, 2019
sp_UserOfflineSmall Offline

Hi,
Where can I find an example on how to do it?

Thanks in advance.

January 8, 2020
12:48, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

For general Write and Call service calls, see the SampleConsoleClient example methods SampleConsoleClient.write and SampleConsoleClient.callMethod and refer to javadocs for the SDK methods called.

Complex types are Structures and can be put into Variants the same way as basic types. Writing NodeSet2 files is outside of the scope of the SDK and can be done e.g. with tools like UaModeler. But once you have the model you can use the codegen that comes with the SDK to make the equivalent classes (see codegen manual for more information and the codegen/commandline/configexamples on how to generate some of the models we bundle, one of which is a SampleTypes model, which I recommend testing first).

Alternatively assuming you have connected to a server that has a custom Structure, you can use UaClient.getTypeDictionary().getStructureSpecification(…) to get a StructureSpecification object, then make a DynamicStructure object by passing that. That is a Structure that can be passed to Variants. For more information see the javadocs of the DynamicStructure.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 735

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1