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
TypeDictionary to decode server specific structures
September 6, 2018
12:53, EEST
Avatar
Markus Friese
New Member
Members
Forum Posts: 2
Member Since:
September 6, 2018
sp_UserOfflineSmall Offline

Hello,

I tried to read the value of a server specific structure with SampleConsoleClient in Toolkit 3.1.6-542 and got following error:

org.opcfoundation.ua.encoding.DecodingException: Bad_DecodingError (code=0x80070000, description=”Cannot init typedictionaries”)
at com.prosysopc.ua.typedictionary.TypeDictionary.decode(SourceFile:278)
at com.prosysopc.ua.samples.client.SampleConsoleClient.dataValueToString(SampleConsoleClient.java:963)
at com.prosysopc.ua.samples.client.SampleConsoleClient.read(SampleConsoleClient.java:1738)
at com.prosysopc.ua.samples.client.SampleConsoleClient.mainMenu(SampleConsoleClient.java:1444)
at com.prosysopc.ua.samples.client.SampleConsoleClient.main(SampleConsoleClient.java:163)
Caused by: java.lang.NullPointerException
at com.prosysopc.ua.typedictionary.TypeDictionary.X(SourceFile:428)
at com.prosysopc.ua.typedictionary.TypeDictionary.decode(SourceFile:275)
… 4 more

First I thought it could be a server problem. But UAExpert can read the value and can display the fields and values of the structure.

September 6, 2018
14:04, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The dataypedictionary system is complex. Initializing our implementation/support for it involves a lot of Read and Browse calls in multiple steps and currently unfortunately does not have very good error reporting if something does not work.

What server is this? What version of OPC UA it supports? (i.e. if it is a 1.04 server it could have something we do not yet support).

This is a bit complex, but is there any node that cannot complete all 3 steps?:
1. Taking all HasComponent target nodes from all nodes under Root/Types/DataTypes/OPC Binary
1.1. e.g. example Root/Types/DataTypes/OPC Binary/Opc.Ua/AddNodesItem
2. Taking all nodes as result of 1, do they all have Inverse HasDescription reference target?
2.1. The AddNodesItem in 1.1. would point (the source of the inverse reference): DataTypes/Structure/AddNodesItem/Default Binary (note that this is non-hierarchical reference and might not be seen in normal clients UIs)
3. Taking all nodes as result of 2, do they all have Inverse HasEncoding reference that is a Structure DataType node
3.1. The Default Binary node of 2.1. would point (the source of the inverse referene): DataTypes/Structure/AddNodesItem

Based on the code a NPE would be possible if a node would fail to have the inverse reference in steps 2 or 3., error reporting could be improved in a future SDK version.

P.S.
Also it should be noted that technically the datatypedictionary system is a complete parallel system in the specification vs. the normal encoding system. Our implementation takes a best-effort attempt for linking it with the normal system, i.e. uses the data from it and constructs encoders and decoders. Normal system works on NodeIds that works on the Namespace + id value, the datatypedictionary system works on XML Namespaces and Names (the dictionaries are encoded XML documents) and a normal Namespace can have multiple dictionaries with different XML Namespaces. It is possible that the UaExpert implementation is different. Also it is possible that this is a UA 1.04 server and UaExpert would support the complete new system of 1.04 i.e. the new DataTypeDefinition Attribute.

September 6, 2018
15:44, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

I sent you a beta version (via mail) with more logging for the initialization part.

September 6, 2018
16:03, EEST
Avatar
Markus Friese
New Member
Members
Forum Posts: 2
Member Since:
September 6, 2018
sp_UserOfflineSmall Offline

Hi,
yes, it’s a 1.04 server.

this is the output from the beta version.

org.opcfoundation.ua.encoding.DecodingException: Bad_DecodingError (code=0x80070000, description=”Cannot init typedictionaries”)
at com.prosysopc.ua.typedictionary.TypeDictionary.decode(SourceFile:278)
at com.prosysopc.ua.samples.client.SampleConsoleClient.dataValueToString(SampleConsoleClient.java:962)
at com.prosysopc.ua.samples.client.SampleConsoleClient.read(SampleConsoleClient.java:1737)
at com.prosysopc.ua.samples.client.SampleConsoleClient.mainMenu(SampleConsoleClient.java:1443)
at com.prosysopc.ua.samples.client.SampleConsoleClient.main(SampleConsoleClient.java:163)
Caused by: com.prosysopc.ua.typedictionary.TypeDictionaryException: Cannot initialize, node: NodeId=ns=6;s=enumModelDesignerStatusStateDescription, NodeClass=Variable, BrowseName=6:EnumModelDesignerStatusState DataType=i=12, ValueRank=-1, MinimumSamplingInterval=0,000000, AccessLevel=[CurrentRead], UserAccessLevel=[CurrentRead], Historizing=false, Value=DataValue(value=EnumModelDesignerStatusState, statusCode=GOOD (0x00000000) “”, sourceTimestamp=09/06/18 08:51:01.0890000 GMT, sourcePicoseconds=0, serverTimestamp=09/06/18 08:51:01.0890000 GMT, serverPicoseconds=0) , does not have inverse HasDescription Reference
at com.prosysopc.ua.typedictionary.TypeDictionary.X(SourceFile:433)
at com.prosysopc.ua.typedictionary.TypeDictionary.decode(SourceFile:275)
… 4 more
Node: ns=5;i=10000119.Value | Status: GOOD (0x00000000) “” | Value: org.opcfoundation.ua.builtintypes.ExtensionObject@5f3310b0 | ServerTimestamp: 2018 Sep 06 (MESZ) 14:55:43.840 | SourceTimestamp: 2018 Sep 06 (MESZ) 14:55:43.840

I will sent you the nodeset2 description by mail.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
13 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: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1