Showcase HyCAN: A Modern C++20 CAN Framework for Linux (Non-root access, Epoll-based)
Hi everyone,
I'd like to share an open-source project I've been working on: HyCAN. It's a high-performance C++ CAN communication framework designed for Linux.
GitHub: HyCAN
Why did I build this? Working with SocketCAN on Linux often involves two pain points:
Root Privileges: You usually need sudo to bring up interfaces or configure bitrates, which is a security risk for user-space control algorithms.
Boilerplate: Writing raw socket / bind / epoll code is tedious and error-prone.Key Features:
🚀 Daemon Architecture: A system service manages the interfaces, allowing your app to run without root privileges.
⚡ High Performance: Based on epoll, handling 100k+ msgs/s with low CPU usage (\~20% on Ryzen 7) and 10µs latency.
🛠 Modern C++: Written in C++20, utilizing tl::expected for error handling and concepts for cleaner APIs.
🔒 Real-time Ready: Built-in support for SCHED_FIFO, CPU affinity, and memory locking.I'm looking for feedback on the architecture and API design. Feel free to roast my code!Thanks!
https://redd.it/1p5fkn1
@r_cpp
Post #24330
17