I need a function to do the following. To take a char buffer of 14 octal bytes. These byes represent ASCII characters.
Take the buffer and convert the last four bytes to an integer (bytes 10,11,12 and 13). The ETX (\003) is byte 14 on the end. buf2 is char buf2
buf2 contains \002\006\105\060\060\060\060\060\060\106\106\105\0 61\003
31 converts from \060\060\061\106 (i.e. 001F in Ascii)
-31 converts from \106\106\105\061 (i.e. FFE1 in Ascii)
0 converts from \060\060\060\060
7 converts from \060\060\060\007
15 convers from \060\060\060\106
If you look at an ASCI to octal table it will make sense.
I need the four chars in the last two byes to be converted to an interger.