Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi all,
I try to create services for joining 2, 32 bit int as a high_byte and low_byte.
Like join() function in picture below.
But seem like in services can't left shift 32 index.
I try to use (3 << 32) the result is always 3 not 12,884,901,888.
But when I use (3<<2) the result is 12.
What is I miss or it have another way to join 2 32 int into 1
This is Rhino Javascript engine, and I don't think it can handle 64bits Unsigned Ints. You have two options, you can build a Java extension which handles your Unsigned Ints through ThingWorx Long base types (still you will have problems, becouse Thingworx LONG base type it's a 64bits Signed Int: https://www.ptc.com/en/support/article/CS247959 ), or you can use a Javascript Library which handles 64bits Unsigned Int like this one: http://theori.io/pwnjs/integer.js.html or many others which should be outthere.
Regads.
Hi Carles
Thank you for your suggestion, I will try the second option.
Regards.