Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_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: 1029
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: 1919
Currently Online: msaala
Guest(s) 33
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 732
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1545
Posts: 6515
Newest Members:
mood edibles, LouieWreve, daniellabdx, janessan21, sammiebeak359, gena7127517, thorstenbouldin, Brett.Rollason, steven014223542, Roberthat
Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 1, Bjarne Boström: 1045, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1