08-10-2010 03:10 AM
Hi,
I have a question here. My Data is of I64 hexadecimal. I have several of them but i mention one here to simplify things.
I need to transmit this data via TCP and therefore need to send them by Little Endian Byte Ordering. For eg. my data is "1020304050607080", therefore in little endian byte ordering form, the data will be send as" "8070605040302010". I have no problem to achieve this. But the problem arises when i need to compute the checksum.
For e.g. for this particular "8070605040302010", i need to break them down to "8070", "6050", "4030", "2010" to compute the checksum. Say for e.g. i am using a "numeric constant" to display "1020304050607080" in I64, it then goes through a "Flatten to string" function to convert the format to little endian byte ordering format. Afterwhich the output of the flatten to string function is wired to the "TCP write" function for TCP transmission. Therefore, i wish to ask how can i break up the I64 to four I16 data? Please advise. Thank you.
08-10-2010 03:24 AM
08-10-2010 03:40 AM - edited 08-10-2010 03:41 AM
Or you could typecast it to a cluster of 4 U16:
Ton