Functionality to easily read and write to CAN bus in C/C++ for GNU/Linux OSs.
Building requires use of GNU make utility. Number of commands available:
make/make all- builds all files (library, examples)make examples- builds all examples (with library as a prerequisite)make lib- builds can_interact library onlymake clean- deletes all compiled output
C functionality written in C89.
C++ API is a thin-header only wrapper and is CXX11 compatible - no compilation needed.
Simply include can_interact.h and link subsequent compiler output with can_interact.o object file for C/C++.
If you are using C++, you may instead opt to use can_interact.hh, which acts as the C++ wrapper. This includes:
- Functions as-is from
can_interact.h - Namespaced functions (
can_interact::) which return data directly & throw detailed exceptions in cases of errors - (Where applicable,) support for
std::vectorandstd::arrayarguments as-well C-style lists - A
CANclass (namespaced too) to establish & maintain connections and to receive & send messages over CAN
Note you will still need to link with can_interact.o as this is a thin wrapper with minimal functionality of their own.
See docs for documentation and examples directory for practical use of this library.
See LICENSE for terms of usage.