Language | Build | Coverage | License | Documentation |
---|---|---|---|---|
Canary is a thin, C++11 wrapper over the SocketCAN API in Linux, which enables communication over CAN bus using idioms from the Boost.ASIO and ASIO libraries.
Canary depends only on ASIO and the C++11 standard library. By default, it
uses Boost.ASIO, but can be configured to use standalone ASIO. The
CANARY_STANDALONE_ASIO
macro makes the library depend only on standalone ASIO.
Running tests requires lightweight test facilities from Boost.Core (which is a header only library).
Canary is header-only, so you only need to add the include directory to the
include paths in your build system. An install
target is available in CMake
which will install the headers and a CMake find_package
configuration script
for easy consumption in projects built with CMake:
mkdir build
cd build
cmake ..
make install
After installation, a project built with CMake can consume the library using
find_package
:
find_package(canary REQUIRED)
target_link_libraries(my_target PUBLIC canary::canary)
Tests require the existence of 2 virtual CAN interfaces - vcan0
and vcan1
,
which can be created with the create_vcans.sh
script:
sudo tools/create_vcans.sh vcan0 vcan1
Tests can be run using the standard test
target generated by CMake:
mkdir build
cd build
cmake ..
make test
- Examples (TODO)
- API Reference - entities
- API Reference - files