C++ functions for encoding and decoding CAN frames ( uint8_t[8] )
Copy the include/can_encode_decode.inl into your c++ project and use the inline functions.
uint8_t src_array[8];
encode(src_array, 3.0, 56, 3, false, false, 1.000000, 0);
decode(src_array, 56, 3, false, false, 1.000000, 0); // 3.0
encode(src_array, 35, 2, 6, true, false, 1.0, 0);
decode(src_array, 2, 6, true, false, 1.000000, 0) // 35.000000
encode(src_array, 1.0, 0, 2, true, false, 1.0, 0);
decode(src_array, 0, 2, true, false, 1.000000, 0); // 1.000000
./run_tests.sh