
Michael Wacenovsky
New Member
Members
Forum Posts: 1
Member Since:
03/07/2025
03/07/2025

I have to parse an OPC UA Pubsub NetworkMessage as described in https://reference.opcfoundatio…..cs/7.2.4.4
The message I get via MQTT is (in hex):
d1041e00000041383030305f4350383035785f454753315f47463234303635303738323201e803eb016a06f01f5b2ff01f5b2f010019000000080030844e9ea78edb01906e6d43
In partucular I found out:
>d1 Version/Flag 1101 0001 PublisherId enabled,
GroupHeader disabled ,
Payloadheader enabled,
ExtendedFlags1 enabled
>04 extendedFlags1 0000 0100 PublisherId is of DataType String,
DataSetClassId disabled,
SecurityHeader disabled,
Timestamp disabled,
PicoSeconds disabled,
ExtendedFlags2 disabled
so we continue with PublisherId of type string:
>1e000000 length of publisher Id = 30 Byte
The publisherId is
>41383030305f4350383035785f454753315f474632343036353037383232
DataSetClassId is disabled, GroupHeader disabled ->
Next should be: PayloadHeader for DataSetMessage https://reference.opcfoundatio…..cs/7.2.4.5
>01 messageCount = 1
>e803 DataSetWriterId[0]
NOW THE PROBLEM:
timestamp disabled, picoseconds disabled, no promoted fields , no security header
-> next should be payload. Since we have payload https://reference.opcfoundation.org/Core/Part14/v105/docs/7.2.4.5
payload starts with sizes[0]: List of byte sizes of the DataSetMessages.
>eb01 16 Bit Uint16 = 491 size of first DataSetMessage(and only)
AT THIS STAGE there must already be something wrong, because there are only 30 remaining bytes and size cannot be 491!!!
6a06f01f5b2ff01f5b2f010019000000080030844e9ea78edb01906e6d43
Where is the problem in my decoding?
Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 34
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1464
Posts: 4951