Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Parsing NodeId

Hi Kevin,

Thanks for pointing this out

I wrote a parser that could now decode the NodeId, but when I ran it against a unit test, I'm not getting the correct values. For example., in the Part 6 of the Spec, Page number 13, Figure 9, I'm using the Four byte NodeId sample data that they have as given below:

EncodingNamespaceIndex

Identifier

01

05

01

40 


According to this example., It should be decoded as "OPC Unified Architecture

Four Byte NodeId with Namespace = 5 and Identifier = 1 025  

But when I ran my tests with the same example., I get

Four Byte NodeId with Namespace = 5 and Identifier = 1 0241

Do you have a clue as to what could have been wrong on my side?

Thanks!


On Mon, Aug 5, 2019 at 11:32 PM Kevin Herron <kevinherron@xxxxxxxxx> wrote:

On Mon, Aug 5, 2019 at 11:21 AM Joe San <codeintheopen@xxxxxxxxx> wrote:
I have some questions understanding the byte representation of the NodeId.

I'm now parsing / decoding the byte array that I get from a OPC UA Pub / Sub server and I'm about to write a parser that should parse the dataTypeId field as described in Table A.3 – DataTypeDescription Structure of the Part 14 specification! It says that the dataTypeId is of type NodeId which means I should look into the Part 6 spec where the NodeId Encoding is described. 

So from Part 6 of the specification Table 5 – NodeId components describes NodeId components, but I could not understand how I could get it parsed from the sample data that I have. For example., here is the set of Bytes that I have which I believe should be parsed as dataTypeId:

1 1 1 0

Can someone please give me a hint as to how I should go about extracting the NodeId from this set of Bytes? I'm pretty sure that it is just these 4 bytes as the ones that come after this, I have already figured out that it is going to be part of the name in the DataTypeDescription structure! 

Since NodeId is not specific to Pub Sub, I thought of addressing it at the milo dev list with the hope of someone being able to help me out!

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top