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
createInstance(BaseObjectTypeNode.class, ...)
January 15, 2015
18:39, EET
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi,

I try to create new object instances using nodeManager.createInstance(BaseObjectTypeNode.class, …). It throws the exception:

Exception in thread “main” com.prosysopc.ua.server.UaInstantiationException: Could not read type definition node identifier (expecting Annotation TypeDefinitionId) from the class class com.prosysopc.ua.types.opcua.server.BaseObjectTypeNode

The same call using a FolderTypeNode.class instead of BaseObjectTypeNode.class works properly. Looking into the sources, the mentioned annotation is indeed missing (it is also missing in some other classes).

While creating an instance of a baseObjectType in the “old fashioned way” (new UaObjectNode(…)) I noticed that after adding an “Organizes” reference back to the “Objects” folder with inverse=true, UAExpert does not show the corresponding “organizedBy” reference on the object node. UAExpert shows the inverse hasComponent / componentOf reference for a manually added method though. (UAExpert is configured to show references in both directions). Organizes/OrganizedBy is properly display between Root and the ObjectsFolder.

The SDK version used is 2.0.3

Kind regards, Hans-Uwe

January 16, 2015
8:30, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Good find. The BaseObject/VariableTypeNode are not code-generated, therefore they miss the annotation. While BaseVariableType is abstract, the BaseObjectType is not, so it should be instantiable. Will be fixed to 2.1.0, which should be released next week. Quickfix for source editions could just add the annotation manually similar to other classes (NodeIds are found from Identifiers class).

I’ll check the other issue. Can you also mention the precise version number (i.e. 2.0.3-???)

– Bjarne

January 16, 2015
10:23, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

At least doing the following on development version:

NodeManagerUaNode nmu = new NodeManagerUaNode(server, “http://www.prosysopc.com/OPCUA/TestManualObjectTypeNode”);

UaObject obj = new UaObjectNode(nmu, new NodeId(nmu.getNamespaceIndex(), 42), “TestManualObjectTypeNode”, Locale.ENGLISH);

obj.addReference(Identifiers.ObjectsFolder, Identifiers.Organizes, true);

seems to display OrganizedBy reference correctly. So this should/will be corrected in 2.1.0.

January 16, 2015
11:33, EET
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi,

the full version number of the SDK I’m using is 2.0.3-307

interestingly, today I cannot reproduce the problem of the missing “OrganizedBy” reference with a manually created uaObject. Maybe a hickup in UAExpert yesterday (or a user error ;-) ). All references seem to be properly created.

– Hans-Uwe

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, 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