![sp_Feed](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_Feed.png)
![sp_TopicIcon](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_TopicIcon.png)
0:35, EET
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/defaults/userdefault.png)
December 16, 2013
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
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
8:43, EET
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/1496998201jaro_researchgate_2017.jpg)
December 21, 2011
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
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.
Most Users Ever Online: 518
Currently Online:
25 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 142
pramanj: 86
Francesco Zambon: 83
rocket science: 82
Ibrahim: 76
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 704
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1482
Posts: 6316
Newest Members:
samui, TommyDab, wross, Jeremyknock, Pedromon, DonaldEdism, Miguelplese, Scotanine, katesalas95, PetertumModerators: Jouni Aro: 1015, Pyry: 1, Petri: 0, Bjarne Boström: 994, Jimmy Ni: 26, Matti Siponen: 330, Lusetti: 0
Administrators: admin: 1