

18:39, EET

February 21, 2014

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
8:30, EET

April 3, 2012

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
10:23, EET

April 3, 2012

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.
11:33, EET

February 21, 2014

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
Most Users Ever Online: 1919
Currently Online:
50 Guest(s)
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: 809
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1541
Posts: 6504
Newest Members:
vincent.lin1970@gmail.com, JamesLiabe, DanielMaype, RobertPrire, VirCibre, semunah, StevenMot, elinorbalke7872, CharlesGUirm, KalyaniModerators: Jouni Aro: 1029, Pyry: 1, Petri: 0, Bjarne Boström: 1040, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1