Incoming UDP data Hex Bug?

Has anyone had any issues when reading in UDP data and converting hex bytes to a value. I am having a really strange bug which my hex data on the UDP output node side jumps.

for example i am receiving a value of

32767 which come in in the packet as 7f:ff

when the next packet comes in for 32768 it reads 80:00 in wireshark but comes out on the UDP in vvvv node as a much higher value in the 42000 range.

I’m not doing anything particularly clever just receiving the data and passing it through Asstring (raw) and then through a byte node, this is the value i have coming out of the byte node and ran out of time to investigate the direct udp output. Can we have an IObox RAW please, it would be really useful for debugging.

If anyone can suggest anything please do, and i definitely know the incoming data is correct.

ill get the patch up soon

thanks

Andy

yes please provide a patch, that sounds strange. also latest alpha shows hex in the iobox…

Hi Joreg, yes please find attached zip, and its the patch node GetKinesysPositions (Kinesys). Ive tried deugging as far as the byte node so far and also been google the -32767 +32676 16 bit range could this have something to do with it?
Just downloaded the latest alpha, thankyou for the new iobox :)

Andy

Retreving Positional data from Kinesys Automation software (17.9 kB)

And even reading the data in as a signed 32bit which it really is, using the ord node produces the same results.

Fixed, I changed the AsString encoding to iso-8859-1 and changed to read to 32bits.

The indexing looks strange but it works now.

That was a learning curve, The new inbox for the raw data is fantastic!

v2 GetKinesysPositions (Kinesys).zip (2.0 kB)

hm…it seems odd for me that you go via string there at all since you obviously know that you expect Int32 numbers?! have you tried to just use AsValue (Raw) with its Format set to Int32?

Ahh, i see, I missed that, the data packet coming in contains a mixture of 8bit 16bit and 32bit, is it just a case of spreading an inout of enumerations to match the format? Thanks, ill have a play.

exactly. just see the helppatch of AsValue (Raw).