16:40, EEST
May 24, 2018
Hi,
I have been playing around with the “SampleTypes.xml” file provided with the Prosys Java OPCUA SDK and noticed an issue with the DataType Identifier of the InputArgument of the method “ChangeState”.
The details of what I did are as follows:
I instantiated an Object of “ValveObjectType”. To the instance, I then added the optional method “ChangeState”. This method has an input argument which is of an enum DataType called “ValveStateDataType”. Then I tried to call the method from the UAExpert client and wasn’t able to provide the input argument. On investigating I found out that the namespace index of the idenfitier of the input argument datatype was wrong. Basically it couldn’t really find the type definition for the input argument.
Since all the type definitions belong to the namespaceuri “http://ua.prosysopc.com/SampleTypes”, I expected that the namespace index of the datatype identifier of the InputArgument would correspond to index of “http://ua.prosysopc.com/SampleTypes” as defined in the namespacearray of the server. But after printing the attributes of the InputArgument, it looks like the DataType attribute remains untouched. On manually changing the namespaceindex in the nodeset.xml to conform to the index corresponding to the Type definition namespace as per the server namespacearray, it seemed to work fine.
Is this a known issue? And if yes, is there any workaround for it?
Regards,
Ashwin
17:55, EEST
April 3, 2012
Hi,
Thanks for the notice. Issue is known (for like 2-3 hours, due to another support case).
Editing the model is not the correct way (but in practice might be the only easy workaround, but it might not work anymore when this is fixed).
The model and address space indexes are different. Address space maps with the NamespaceArray, but the model maps with the NamespaceUris block. In practice the uri is what defines the namespace, and in both cases index is optimization. As the model only defines namespaces what it needs (+what it provides), it uses in practice different set of indexes than the server, which has more models loaded (i.e. the models do not know about the server for which they are loaded nor about other models, unless they are dependencies).
SDK should handle the index change, but for the NodeId values that are inside (the Argument) Structure values it does not work at the moment. The issue is caused by the 1.3 stack as unintended side-effect due to structure value parsing changes. I can send a beta version of the SDK after this is fixed, but otherwise it should be fixed by the next release.
P.S. This only affects SDK version 3.x
Most Users Ever Online: 1919
Currently Online:
14 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 737
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerleyModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1