I am using the FlexCAN library. The message array is a bunch of integers.
In my particular case, I have two integers that actually represent a two-byte larger integer.
The hex string '10E' (integer 270) has come through as an array with 16 (10 hex) and 14 (E hex). So, the array looks like:
bytearray[0] = 14 // E
bytearray[1] = 16 // 10
I'm failing to understand how to take these two ints and convert them to the actual int. Converting the ints back to hex and then back to a big int seems odd, and I can't really figure out how to do that, either.
Sorry, this low-level byte magic C++ is beyond me.
In my particular case, I have two integers that actually represent a two-byte larger integer.
The hex string '10E' (integer 270) has come through as an array with 16 (10 hex) and 14 (E hex). So, the array looks like:
bytearray[0] = 14 // E
bytearray[1] = 16 // 10
I'm failing to understand how to take these two ints and convert them to the actual int. Converting the ints back to hex and then back to a big int seems odd, and I can't really figure out how to do that, either.
Sorry, this low-level byte magic C++ is beyond me.