Please consider registering

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
New Member
Forum Posts: 2
Member Since:
December 16, 2013
sp_UserOfflineSmall Offline

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?

Martin Boers

December 16, 2013
8:43, EET
Jouni Aro
Forum Posts: 1007
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: Arktistync
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

Francesco Zambon: 78

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1450

Posts: 6201

Newest Members:

jadadibdin6, DiianaZof, antoniettakarn, Tor, Arktistync, floybateson9, inilarythikibia, celinamcguire5, helenblodo

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

Administrators: admin: 1