Libcan Encode Decode Save

C++ functions for encoding and decoding CAN frames ( uint8_t[8] )

Project README

libcan-encode-decode

Build Status

C++ functions for encoding and decoding CAN frames ( uint8_t[8] )

Usage

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

./run_tests.sh

Open Source Agenda is not affiliated with "Libcan Encode Decode" Project. README Source: reinzor/libcan-encode-decode
Stars
34
Open Issues
0
Last Commit
4 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating