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
Instantiating a new server "UaNodeObject" using an instance of a "UaObjectTypeNode"
December 16, 2013
0:35, EET
Avatar
Martin
New Member
Members
Forum Posts: 2
Member Since:
December 16, 2013
sp_UserOfflineSmall Offline

Hello,
I’m trying the OPC UA Java SDK and at the same time becoming familiar with the OPC UA specifications.
I am following the Java SDK Server Tutorial and have created an instance of UaObjectTypeNode – in the tutorial, this object is named “myDeviceType”.
I understand that it is possible to add Components and Properties to myDeviceType, in order to provide a complete definition of this Type in the OPC UA Server Address Space.
After fully defining myDeviceType, with all its Components and Properties, I now want to instantiate several UaObjectNode objects based on the definition of myDeviceType – for example, myDevice1, myDevice2, myDevice3.
However, I cannot see a simple way of creating these UaNodeObject instances, complete with all the Components and Properties I defined for myDeviceType. It seems that I need to explicitly add all the same Components and Properties to each instance of myDeviceType.
Am I missing something?

Regards,
Martin Boers

December 16, 2013
8:43, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, that is unfortunately the case with the SDK 1.x.

With SDK 2.0 we will have ways to instantiate objects from the type definitions. You should have received a notification of the public beta last week. Please send mail to sales at prosysopc.com, if you missed that.

In the new SampleConsoleServer there is a createTestInstance() method which shows an example of it. The exact syntax is still subject to change, though, so I won’t mention it here.

With SDK 1.x, the best option is to write a Java class that implements the complete structure. For SDK 2.0 we will also provide a way to generate this kind of Java classes.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 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

TimK: 41

Member Stats:

Guest Posters: 0

Members: 685

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss

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