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
Moderator
Members

Moderators
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: 983
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: 518

Currently Online:
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1