Turning parts of hex string into little endian
Hi
Im trying to write a program that will test some stuff at work and the protocol they have made is buildt up like this:
Prelim (always the same) , length (of data field),senso. no, adress, data and crc.
The CRC is calculated from all except prelim, little endian on all fields (turned after crc-calc) on everything but prelim.
Can someone pleas help me?
Re: Turning parts of hex string into little endian
Can you post some examples that show the contents of the input and the desired output?
Re: Turning parts of hex string into little endian
Here goes
Code:
utb2sio 04 01 00 08 2b 45 // in big endian
I do have all the diffent parts of the string in separate strings that I combine.
The data field content is preset in the protocol.
Re: Turning parts of hex string into little endian
What does that post show? Is it a String with spaces between the parts or what?
Can you post the input and show what output you want from it?