Buffer parser node "LSW / MSW"

I found this closed, unsolved topic: https://discourse.nodered.org/t/going-crazy-trying-to-read-signed-int32-from-buffer
as I want to parse data from the same device. The problem is that it is providing int32 data as "LSW / MSW" (Least significant word first) eq. 0xabcd as 0xcdab. Is there anyway to parse this data within the buffer parser node?

Yes. Use the swap32 option.

You can directly choose if you want (le) or (be).


Thank you for your quick answers. Big endian and little endian refers only to the bits inside a byte (LSB / MSB). The solution to my issue was the Byte swap feature. I set Byte swap to Swap 16 and now it's correctly parsed.
Have a nice day!

AFAIK Little indian/big indian has always referred to the order of bytes within a multibyte integer and has never been used as a description of internal bits in a byte.

I've never seen a byte where the bits are the "wrong" way around :slight_smile:

1 Like

You are both correct, however when talking about endian as bits inside a byte that is typically called bit-endianess & is often only at communication level (not architecture level)

Good write up here: Endianness - Wikipedia


Thanks for your comments. In the buffer parser node it looks like to be as follows:

  • the variable type "int32 be" and "int32 le" parses 0xabcd or 0xdcba
  • the byte swap 16 for the same value parses 0xabcd as 0xcdab

That's why the manufacturer of this device speaks from LSW / MSW as a "Word" is two Bytes.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.