Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daleksla/can_interact
Functionality to easily read and write to CAN bus in C/C++ for GNU/Linux OSs
https://github.com/daleksla/can_interact
c c89 can-bus cxx cxx-library cxx11 linux socketcan
Last synced: about 1 month ago
JSON representation
Functionality to easily read and write to CAN bus in C/C++ for GNU/Linux OSs
- Host: GitHub
- URL: https://github.com/daleksla/can_interact
- Owner: daleksla
- License: other
- Created: 2022-03-07T13:58:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-04T21:33:49.000Z (about 2 years ago)
- Last Synced: 2024-09-30T01:22:14.804Z (about 2 months ago)
- Topics: c, c89, can-bus, cxx, cxx-library, cxx11, linux, socketcan
- Language: C
- Homepage:
- Size: 391 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# can_interact
## READMEFunctionality to easily read and write to CAN bus in C/C++ for GNU/Linux OSs.
### Building
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 only
* `make clean` - deletes all compiled outputC functionality written in C89.
C++ API is a thin-header only wrapper and is CXX11 compatible - no compilation needed.
### Using
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::vector` and `std::array` arguments as-well C-style lists
* A `CAN` class (namespaced too) to establish & maintain connections and to receive & send messages over CANNote 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.