How to Parse / Decode the DataSetMessage data|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
How to Parse / Decode the DataSetMessage data
Avatar
Jothi Sankarraj
Member
Members
Forum Posts: 29
Member Since:
04/09/2019
sp_UserOfflineSmall Offline
1
08/20/2019 - 11:47
sp_Permalink sp_Print

I have been working on implementing a client for the OPC UA PubSub Part 14, Version 1.04 and so far I managed to fully implement parsing of the DataSetMetaData. I have access to some sample data and the parsing of the MetaData looks okay so far. Now I have to do the next steps which is parsing the DataSetMessage and I have already started with the implementation, but looking at the Spec, I have few questions on the overall machinery.

Where is the Spec is it mentioned about how I should use the parsed DataSetMetaData to actually use it to later on parse the DataSetMessage? So from the bytes that I get as input, I have an internal object representation of my DataSetMetaData. How can I use it to parse the DataSetMessage? Can anyone point me to the corresponding description in the specification to understand how to do this?

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
08/20/2019 - 16:17
sp_Permalink sp_Print

PubSub messages are based on the UA binary encoding. Part 6 tells you everything you need to understand how to encode and decode the PubSub messages.

Avatar
Jothi Sankarraj
Member
Members
Forum Posts: 29
Member Since:
04/09/2019
sp_UserOfflineSmall Offline
3
08/20/2019 - 21:08
sp_Permalink sp_Print

@Randy Unfortunately that answer does not help! I understand that Part 6 has all the information on how to encode, decode the BuiltInDataTypes, but my question was how should I use the DataSetMetaData to parse the DataSetMessage? What role does the DataSetMetaData play? If nothing then why does the Spec deal with DataSetMetaData at all?

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
08/20/2019 - 22:52
sp_Permalink sp_Print

If you are not dealing with Raw encoding then the DataSetMetaData is not needed. It just gives you information that make be useful when figuring out what to do with the data but it is not needed for decoding.

If you are dealing with a raw encoding the DataSetMetaData gives you the number, order, datatype and valuerank of each field in the message.

Avatar
Jothi Sankarraj
Member
Members
Forum Posts: 29
Member Since:
04/09/2019
sp_UserOfflineSmall Offline
5
08/20/2019 - 23:55
sp_Permalink sp_Print

@Randy That helps! So if the field encoding is of type Raw then I need to refer to the DataSetMetaData to parse the DataSetMessage and if not, then all I need to do is to just parse it as I parsed the DataSetMetaData! I will give it a try!

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855